

























/**************************************************************************************



/common/js/lib/jquery/jquery.min.js



**************************************************************************************/
/*! jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
!function(a, b) {
    "object" == typeof module && "object" == typeof module.exports ? module.exports = a.document ? b(a, !0) : function(a) {
        if (!a.document)
            throw new Error("jQuery requires a window with a document");
        return b(a)
    } : b(a)
}("undefined" != typeof window ? window : this, function(a, b) {
    var c = [], d = c.slice, e = c.concat, f = c.push, g = c.indexOf, h = {}, i = h.toString, j = h.hasOwnProperty, k = "".trim, l = {}, m = "1.11.0", n = function(a, b) {
        return new n.fn.init(a, b)
    }, o = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, p = /^-ms-/, q = /-([\da-z])/gi, r = function(a, b) {
        return b.toUpperCase()
    };
    n.fn = n.prototype = {jquery: m,constructor: n,selector: "",length: 0,toArray: function() {
            return d.call(this)
        },get: function(a) {
            return null != a ? 0 > a ? this[a + this.length] : this[a] : d.call(this)
        },pushStack: function(a) {
            var b = n.merge(this.constructor(), a);
            return b.prevObject = this, b.context = this.context, b
        },each: function(a, b) {
            return n.each(this, a, b)
        },map: function(a) {
            return this.pushStack(n.map(this, function(b, c) {
                return a.call(b, c, b)
            }))
        },slice: function() {
            return this.pushStack(d.apply(this, arguments))
        },first: function() {
            return this.eq(0)
        },last: function() {
            return this.eq(-1)
        },eq: function(a) {
            var b = this.length, c = +a + (0 > a ? b : 0);
            return this.pushStack(c >= 0 && b > c ? [this[c]] : [])
        },end: function() {
            return this.prevObject || this.constructor(null)
        },push: f,sort: c.sort,splice: c.splice}, n.extend = n.fn.extend = function() {
        var a, b, c, d, e, f, g = arguments[0] || {}, h = 1, i = arguments.length, j = !1;
        for ("boolean" == typeof g && (j = g, g = arguments[h] || {}, h++), "object" == typeof g || n.isFunction(g) || (g = {}), h === i && (g = this, h--); i > h; h++)
            if (null != (e = arguments[h]))
                for (d in e)
                    a = g[d], c = e[d], g !== c && (j && c && (n.isPlainObject(c) || (b = n.isArray(c))) ? (b ? (b = !1, f = a && n.isArray(a) ? a : []) : f = a && n.isPlainObject(a) ? a : {}, g[d] = n.extend(j, f, c)) : void 0 !== c && (g[d] = c));
        return g
    }, n.extend({expando: "jQuery" + (m + Math.random()).replace(/\D/g, ""),isReady: !0,error: function(a) {
            throw new Error(a)
        },noop: function() {
        },isFunction: function(a) {
            return "function" === n.type(a)
        },isArray: Array.isArray || function(a) {
            return "array" === n.type(a)
        },isWindow: function(a) {
            return null != a && a == a.window
        },isNumeric: function(a) {
            return a - parseFloat(a) >= 0
        },isEmptyObject: function(a) {
            var b;
            for (b in a)
                return !1;
            return !0
        },isPlainObject: function(a) {
            var b;
            if (!a || "object" !== n.type(a) || a.nodeType || n.isWindow(a))
                return !1;
            try {
                if (a.constructor && !j.call(a, "constructor") && !j.call(a.constructor.prototype, "isPrototypeOf"))
                    return !1
            } catch (c) {
                return !1
            }
            if (l.ownLast)
                for (b in a)
                    return j.call(a, b);
            for (b in a)
                ;
            return void 0 === b || j.call(a, b)
        },type: function(a) {
            return null == a ? a + "" : "object" == typeof a || "function" == typeof a ? h[i.call(a)] || "object" : typeof a
        },globalEval: function(b) {
            b && n.trim(b) && (a.execScript || function(b) {
                a.eval.call(a, b)
            })(b)
        },camelCase: function(a) {
            return a.replace(p, "ms-").replace(q, r)
        },nodeName: function(a, b) {
            return a.nodeName && a.nodeName.toLowerCase() === b.toLowerCase()
        },each: function(a, b, c) {
            var d, e = 0, f = a.length, g = s(a);
            if (c) {
                if (g) {
                    for (; f > e; e++)
                        if (d = b.apply(a[e], c), d === !1)
                            break
                } else
                    for (e in a)
                        if (d = b.apply(a[e], c), d === !1)
                            break
            } else if (g) {
                for (; f > e; e++)
                    if (d = b.call(a[e], e, a[e]), d === !1)
                        break
            } else
                for (e in a)
                    if (d = b.call(a[e], e, a[e]), d === !1)
                        break;
            return a
        },trim: k && !k.call("\ufeff\xa0") ? function(a) {
            return null == a ? "" : k.call(a)
        } : function(a) {
            return null == a ? "" : (a + "").replace(o, "")
        },makeArray: function(a, b) {
            var c = b || [];
            return null != a && (s(Object(a)) ? n.merge(c, "string" == typeof a ? [a] : a) : f.call(c, a)), c
        },inArray: function(a, b, c) {
            var d;
            if (b) {
                if (g)
                    return g.call(b, a, c);
                for (d = b.length, c = c ? 0 > c ? Math.max(0, d + c) : c : 0; d > c; c++)
                    if (c in b && b[c] === a)
                        return c
            }
            return -1
        },merge: function(a, b) {
            var c = +b.length, d = 0, e = a.length;
            while (c > d)
                a[e++] = b[d++];
            if (c !== c)
                while (void 0 !== b[d])
                    a[e++] = b[d++];
            return a.length = e, a
        },grep: function(a, b, c) {
            for (var d, e = [], f = 0, g = a.length, h = !c; g > f; f++)
                d = !b(a[f], f), d !== h && e.push(a[f]);
            return e
        },map: function(a, b, c) {
            var d, f = 0, g = a.length, h = s(a), i = [];
            if (h)
                for (; g > f; f++)
                    d = b(a[f], f, c), null != d && i.push(d);
            else
                for (f in a)
                    d = b(a[f], f, c), null != d && i.push(d);
            return e.apply([], i)
        },guid: 1,proxy: function(a, b) {
            var c, e, f;
            return "string" == typeof b && (f = a[b], b = a, a = f), n.isFunction(a) ? (c = d.call(arguments, 2), e = function() {
                return a.apply(b || this, c.concat(d.call(arguments)))
            }, e.guid = a.guid = a.guid || n.guid++, e) : void 0
        },now: function() {
            return +new Date
        },support: l}), n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(a, b) {
        h["[object " + b + "]"] = b.toLowerCase()
    });
    function s(a) {
        var b = a.length, c = n.type(a);
        return "function" === c || n.isWindow(a) ? !1 : 1 === a.nodeType && b ? !0 : "array" === c || 0 === b || "number" == typeof b && b > 0 && b - 1 in a
    }
    var t = function(a) {
        var b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s = "sizzle" + -new Date, t = a.document, u = 0, v = 0, w = eb(), x = eb(), y = eb(), z = function(a, b) {
            return a === b && (j = !0), 0
        }, A = "undefined", B = 1 << 31, C = {}.hasOwnProperty, D = [], E = D.pop, F = D.push, G = D.push, H = D.slice, I = D.indexOf || function(a) {
            for (var b = 0, c = this.length; c > b; b++)
                if (this[b] === a)
                    return b;
            return -1
        }, J = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", K = "[\\x20\\t\\r\\n\\f]", L = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", M = L.replace("w", "w#"), N = "\\[" + K + "*(" + L + ")" + K + "*(?:([*^$|!~]?=)" + K + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + M + ")|)|)" + K + "*\\]", O = ":(" + L + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + N.replace(3, 8) + ")*)|.*)\\)|)", P = new RegExp("^" + K + "+|((?:^|[^\\\\])(?:\\\\.)*)" + K + "+$", "g"), Q = new RegExp("^" + K + "*," + K + "*"), R = new RegExp("^" + K + "*([>+~]|" + K + ")" + K + "*"), S = new RegExp("=" + K + "*([^\\]'\"]*?)" + K + "*\\]", "g"), T = new RegExp(O), U = new RegExp("^" + M + "$"), V = {ID: new RegExp("^#(" + L + ")"),CLASS: new RegExp("^\\.(" + L + ")"),TAG: new RegExp("^(" + L.replace("w", "w*") + ")"),ATTR: new RegExp("^" + N),PSEUDO: new RegExp("^" + O),CHILD: new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + K + "*(even|odd|(([+-]|)(\\d*)n|)" + K + "*(?:([+-]|)" + K + "*(\\d+)|))" + K + "*\\)|)", "i"),bool: new RegExp("^(?:" + J + ")$", "i"),needsContext: new RegExp("^" + K + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + K + "*((?:-\\d)?\\d*)" + K + "*\\)|)(?=[^-]|$)", "i")}, W = /^(?:input|select|textarea|button)$/i, X = /^h\d$/i, Y = /^[^{]+\{\s*\[native \w/, Z = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, $ = /[+~]/, _ = /'|\\/g, ab = new RegExp("\\\\([\\da-f]{1,6}" + K + "?|(" + K + ")|.)", "ig"), bb = function(a, b, c) {
            var d = "0x" + b - 65536;
            return d !== d || c ? b : 0 > d ? String.fromCharCode(d + 65536) : String.fromCharCode(d >> 10 | 55296, 1023 & d | 56320)
        };
        try {
            G.apply(D = H.call(t.childNodes), t.childNodes), D[t.childNodes.length].nodeType
        } catch (cb) {
            G = {apply: D.length ? function(a, b) {
                    F.apply(a, H.call(b))
                } : function(a, b) {
                    var c = a.length, d = 0;
                    while (a[c++] = b[d++])
                        ;
                    a.length = c - 1
                }}
        }
        function db(a, b, d, e) {
            var f, g, h, i, j, m, p, q, u, v;
            if ((b ? b.ownerDocument || b : t) !== l && k(b), b = b || l, d = d || [], !a || "string" != typeof a)
                return d;
            if (1 !== (i = b.nodeType) && 9 !== i)
                return [];
            if (n && !e) {
                if (f = Z.exec(a))
                    if (h = f[1]) {
                        if (9 === i) {
                            if (g = b.getElementById(h), !g || !g.parentNode)
                                return d;
                            if (g.id === h)
                                return d.push(g), d
                        } else if (b.ownerDocument && (g = b.ownerDocument.getElementById(h)) && r(b, g) && g.id === h)
                            return d.push(g), d
                    } else {
                        if (f[2])
                            return G.apply(d, b.getElementsByTagName(a)), d;
                        if ((h = f[3]) && c.getElementsByClassName && b.getElementsByClassName)
                            return G.apply(d, b.getElementsByClassName(h)), d
                    }
                if (c.qsa && (!o || !o.test(a))) {
                    if (q = p = s, u = b, v = 9 === i && a, 1 === i && "object" !== b.nodeName.toLowerCase()) {
                        m = ob(a), (p = b.getAttribute("id")) ? q = p.replace(_, "\\$&") : b.setAttribute("id", q), q = "[id='" + q + "'] ", j = m.length;
                        while (j--)
                            m[j] = q + pb(m[j]);
                        u = $.test(a) && mb(b.parentNode) || b, v = m.join(",")
                    }
                    if (v)
                        try {
                            return G.apply(d, u.querySelectorAll(v)), d
                        } catch (w) {
                        }finally {
                            p || b.removeAttribute("id")
                        }
                }
            }
            return xb(a.replace(P, "$1"), b, d, e)
        }
        function eb() {
            var a = [];
            function b(c, e) {
                return a.push(c + " ") > d.cacheLength && delete b[a.shift()], b[c + " "] = e
            }
            return b
        }
        function fb(a) {
            return a[s] = !0, a
        }
        function gb(a) {
            var b = l.createElement("div");
            try {
                return !!a(b)
            } catch (c) {
                return !1
            }finally {
                b.parentNode && b.parentNode.removeChild(b), b = null
            }
        }
        function hb(a, b) {
            var c = a.split("|"), e = a.length;
            while (e--)
                d.attrHandle[c[e]] = b
        }
        function ib(a, b) {
            var c = b && a, d = c && 1 === a.nodeType && 1 === b.nodeType && (~b.sourceIndex || B) - (~a.sourceIndex || B);
            if (d)
                return d;
            if (c)
                while (c = c.nextSibling)
                    if (c === b)
                        return -1;
            return a ? 1 : -1
        }
        function jb(a) {
            return function(b) {
                var c = b.nodeName.toLowerCase();
                return "input" === c && b.type === a
            }
        }
        function kb(a) {
            return function(b) {
                var c = b.nodeName.toLowerCase();
                return ("input" === c || "button" === c) && b.type === a
            }
        }
        function lb(a) {
            return fb(function(b) {
                return b = +b, fb(function(c, d) {
                    var e, f = a([], c.length, b), g = f.length;
                    while (g--)
                        c[e = f[g]] && (c[e] = !(d[e] = c[e]))
                })
            })
        }
        function mb(a) {
            return a && typeof a.getElementsByTagName !== A && a
        }
        c = db.support = {}, f = db.isXML = function(a) {
            var b = a && (a.ownerDocument || a).documentElement;
            return b ? "HTML" !== b.nodeName : !1
        }, k = db.setDocument = function(a) {
            var b, e = a ? a.ownerDocument || a : t, g = e.defaultView;
            return e !== l && 9 === e.nodeType && e.documentElement ? (l = e, m = e.documentElement, n = !f(e), g && g !== g.top && (g.addEventListener ? g.addEventListener("unload", function() {
                k()
            }, !1) : g.attachEvent && g.attachEvent("onunload", function() {
                k()
            })), c.attributes = gb(function(a) {
                return a.className = "i", !a.getAttribute("className")
            }), c.getElementsByTagName = gb(function(a) {
                return a.appendChild(e.createComment("")), !a.getElementsByTagName("*").length
            }), c.getElementsByClassName = Y.test(e.getElementsByClassName) && gb(function(a) {
                return a.innerHTML = "<div class='a'></div><div class='a i'></div>", a.firstChild.className = "i", 2 === a.getElementsByClassName("i").length
            }), c.getById = gb(function(a) {
                return m.appendChild(a).id = s, !e.getElementsByName || !e.getElementsByName(s).length
            }), c.getById ? (d.find.ID = function(a, b) {
                if (typeof b.getElementById !== A && n) {
                    var c = b.getElementById(a);
                    return c && c.parentNode ? [c] : []
                }
            }, d.filter.ID = function(a) {
                var b = a.replace(ab, bb);
                return function(a) {
                    return a.getAttribute("id") === b
                }
            }) : (delete d.find.ID, d.filter.ID = function(a) {
                var b = a.replace(ab, bb);
                return function(a) {
                    var c = typeof a.getAttributeNode !== A && a.getAttributeNode("id");
                    return c && c.value === b
                }
            }), d.find.TAG = c.getElementsByTagName ? function(a, b) {
                return typeof b.getElementsByTagName !== A ? b.getElementsByTagName(a) : void 0
            } : function(a, b) {
                var c, d = [], e = 0, f = b.getElementsByTagName(a);
                if ("*" === a) {
                    while (c = f[e++])
                        1 === c.nodeType && d.push(c);
                    return d
                }
                return f
            }, d.find.CLASS = c.getElementsByClassName && function(a, b) {
                return typeof b.getElementsByClassName !== A && n ? b.getElementsByClassName(a) : void 0
            }, p = [], o = [], (c.qsa = Y.test(e.querySelectorAll)) && (gb(function(a) {
                a.innerHTML = "<select t=''><option selected=''></option></select>", a.querySelectorAll("[t^='']").length && o.push("[*^$]=" + K + "*(?:''|\"\")"), a.querySelectorAll("[selected]").length || o.push("\\[" + K + "*(?:value|" + J + ")"), a.querySelectorAll(":checked").length || o.push(":checked")
            }), gb(function(a) {
                var b = e.createElement("input");
                b.setAttribute("type", "hidden"), a.appendChild(b).setAttribute("name", "D"), a.querySelectorAll("[name=d]").length && o.push("name" + K + "*[*^$|!~]?="), a.querySelectorAll(":enabled").length || o.push(":enabled", ":disabled"), a.querySelectorAll("*,:x"), o.push(",.*:")
            })), (c.matchesSelector = Y.test(q = m.webkitMatchesSelector || m.mozMatchesSelector || m.oMatchesSelector || m.msMatchesSelector)) && gb(function(a) {
                c.disconnectedMatch = q.call(a, "div"), q.call(a, "[s!='']:x"), p.push("!=", O)
            }), o = o.length && new RegExp(o.join("|")), p = p.length && new RegExp(p.join("|")), b = Y.test(m.compareDocumentPosition), r = b || Y.test(m.contains) ? function(a, b) {
                var c = 9 === a.nodeType ? a.documentElement : a, d = b && b.parentNode;
                return a === d || !(!d || 1 !== d.nodeType || !(c.contains ? c.contains(d) : a.compareDocumentPosition && 16 & a.compareDocumentPosition(d)))
            } : function(a, b) {
                if (b)
                    while (b = b.parentNode)
                        if (b === a)
                            return !0;
                return !1
            }, z = b ? function(a, b) {
                if (a === b)
                    return j = !0, 0;
                var d = !a.compareDocumentPosition - !b.compareDocumentPosition;
                return d ? d : (d = (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1, 1 & d || !c.sortDetached && b.compareDocumentPosition(a) === d ? a === e || a.ownerDocument === t && r(t, a) ? -1 : b === e || b.ownerDocument === t && r(t, b) ? 1 : i ? I.call(i, a) - I.call(i, b) : 0 : 4 & d ? -1 : 1)
            } : function(a, b) {
                if (a === b)
                    return j = !0, 0;
                var c, d = 0, f = a.parentNode, g = b.parentNode, h = [a], k = [b];
                if (!f || !g)
                    return a === e ? -1 : b === e ? 1 : f ? -1 : g ? 1 : i ? I.call(i, a) - I.call(i, b) : 0;
                if (f === g)
                    return ib(a, b);
                c = a;
                while (c = c.parentNode)
                    h.unshift(c);
                c = b;
                while (c = c.parentNode)
                    k.unshift(c);
                while (h[d] === k[d])
                    d++;
                return d ? ib(h[d], k[d]) : h[d] === t ? -1 : k[d] === t ? 1 : 0
            }, e) : l
        }, db.matches = function(a, b) {
            return db(a, null, null, b)
        }, db.matchesSelector = function(a, b) {
            if ((a.ownerDocument || a) !== l && k(a), b = b.replace(S, "='$1']"), !(!c.matchesSelector || !n || p && p.test(b) || o && o.test(b)))
                try {
                    var d = q.call(a, b);
                    if (d || c.disconnectedMatch || a.document && 11 !== a.document.nodeType)
                        return d
                } catch (e) {
                }
            return db(b, l, null, [a]).length > 0
        }, db.contains = function(a, b) {
            return (a.ownerDocument || a) !== l && k(a), r(a, b)
        }, db.attr = function(a, b) {
            (a.ownerDocument || a) !== l && k(a);
            var e = d.attrHandle[b.toLowerCase()], f = e && C.call(d.attrHandle, b.toLowerCase()) ? e(a, b, !n) : void 0;
            return void 0 !== f ? f : c.attributes || !n ? a.getAttribute(b) : (f = a.getAttributeNode(b)) && f.specified ? f.value : null
        }, db.error = function(a) {
            throw new Error("Syntax error, unrecognized expression: " + a)
        }, db.uniqueSort = function(a) {
            var b, d = [], e = 0, f = 0;
            if (j = !c.detectDuplicates, i = !c.sortStable && a.slice(0), a.sort(z), j) {
                while (b = a[f++])
                    b === a[f] && (e = d.push(f));
                while (e--)
                    a.splice(d[e], 1)
            }
            return i = null, a
        }, e = db.getText = function(a) {
            var b, c = "", d = 0, f = a.nodeType;
            if (f) {
                if (1 === f || 9 === f || 11 === f) {
                    if ("string" == typeof a.textContent)
                        return a.textContent;
                    for (a = a.firstChild; a; a = a.nextSibling)
                        c += e(a)
                } else if (3 === f || 4 === f)
                    return a.nodeValue
            } else
                while (b = a[d++])
                    c += e(b);
            return c
        }, d = db.selectors = {cacheLength: 50,createPseudo: fb,match: V,attrHandle: {},find: {},relative: {">": {dir: "parentNode",first: !0}," ": {dir: "parentNode"},"+": {dir: "previousSibling",first: !0},"~": {dir: "previousSibling"}},preFilter: {ATTR: function(a) {
                    return a[1] = a[1].replace(ab, bb), a[3] = (a[4] || a[5] || "").replace(ab, bb), "~=" === a[2] && (a[3] = " " + a[3] + " "), a.slice(0, 4)
                },CHILD: function(a) {
                    return a[1] = a[1].toLowerCase(), "nth" === a[1].slice(0, 3) ? (a[3] || db.error(a[0]), a[4] = +(a[4] ? a[5] + (a[6] || 1) : 2 * ("even" === a[3] || "odd" === a[3])), a[5] = +(a[7] + a[8] || "odd" === a[3])) : a[3] && db.error(a[0]), a
                },PSEUDO: function(a) {
                    var b, c = !a[5] && a[2];
                    return V.CHILD.test(a[0]) ? null : (a[3] && void 0 !== a[4] ? a[2] = a[4] : c && T.test(c) && (b = ob(c, !0)) && (b = c.indexOf(")", c.length - b) - c.length) && (a[0] = a[0].slice(0, b), a[2] = c.slice(0, b)), a.slice(0, 3))
                }},filter: {TAG: function(a) {
                    var b = a.replace(ab, bb).toLowerCase();
                    return "*" === a ? function() {
                        return !0
                    } : function(a) {
                        return a.nodeName && a.nodeName.toLowerCase() === b
                    }
                },CLASS: function(a) {
                    var b = w[a + " "];
                    return b || (b = new RegExp("(^|" + K + ")" + a + "(" + K + "|$)")) && w(a, function(a) {
                        return b.test("string" == typeof a.className && a.className || typeof a.getAttribute !== A && a.getAttribute("class") || "")
                    })
                },ATTR: function(a, b, c) {
                    return function(d) {
                        var e = db.attr(d, a);
                        return null == e ? "!=" === b : b ? (e += "", "=" === b ? e === c : "!=" === b ? e !== c : "^=" === b ? c && 0 === e.indexOf(c) : "*=" === b ? c && e.indexOf(c) > -1 : "$=" === b ? c && e.slice(-c.length) === c : "~=" === b ? (" " + e + " ").indexOf(c) > -1 : "|=" === b ? e === c || e.slice(0, c.length + 1) === c + "-" : !1) : !0
                    }
                },CHILD: function(a, b, c, d, e) {
                    var f = "nth" !== a.slice(0, 3), g = "last" !== a.slice(-4), h = "of-type" === b;
                    return 1 === d && 0 === e ? function(a) {
                        return !!a.parentNode
                    } : function(b, c, i) {
                        var j, k, l, m, n, o, p = f !== g ? "nextSibling" : "previousSibling", q = b.parentNode, r = h && b.nodeName.toLowerCase(), t = !i && !h;
                        if (q) {
                            if (f) {
                                while (p) {
                                    l = b;
                                    while (l = l[p])
                                        if (h ? l.nodeName.toLowerCase() === r : 1 === l.nodeType)
                                            return !1;
                                    o = p = "only" === a && !o && "nextSibling"
                                }
                                return !0
                            }
                            if (o = [g ? q.firstChild : q.lastChild], g && t) {
                                k = q[s] || (q[s] = {}), j = k[a] || [], n = j[0] === u && j[1], m = j[0] === u && j[2], l = n && q.childNodes[n];
                                while (l = ++n && l && l[p] || (m = n = 0) || o.pop())
                                    if (1 === l.nodeType && ++m && l === b) {
                                        k[a] = [u, n, m];
                                        break
                                    }
                            } else if (t && (j = (b[s] || (b[s] = {}))[a]) && j[0] === u)
                                m = j[1];
                            else
                                while (l = ++n && l && l[p] || (m = n = 0) || o.pop())
                                    if ((h ? l.nodeName.toLowerCase() === r : 1 === l.nodeType) && ++m && (t && ((l[s] || (l[s] = {}))[a] = [u, m]), l === b))
                                        break;
                            return m -= e, m === d || m % d === 0 && m / d >= 0
                        }
                    }
                },PSEUDO: function(a, b) {
                    var c, e = d.pseudos[a] || d.setFilters[a.toLowerCase()] || db.error("unsupported pseudo: " + a);
                    return e[s] ? e(b) : e.length > 1 ? (c = [a, a, "", b], d.setFilters.hasOwnProperty(a.toLowerCase()) ? fb(function(a, c) {
                        var d, f = e(a, b), g = f.length;
                        while (g--)
                            d = I.call(a, f[g]), a[d] = !(c[d] = f[g])
                    }) : function(a) {
                        return e(a, 0, c)
                    }) : e
                }},pseudos: {not: fb(function(a) {
                    var b = [], c = [], d = g(a.replace(P, "$1"));
                    return d[s] ? fb(function(a, b, c, e) {
                        var f, g = d(a, null, e, []), h = a.length;
                        while (h--)
                            (f = g[h]) && (a[h] = !(b[h] = f))
                    }) : function(a, e, f) {
                        return b[0] = a, d(b, null, f, c), !c.pop()
                    }
                }),has: fb(function(a) {
                    return function(b) {
                        return db(a, b).length > 0
                    }
                }),contains: fb(function(a) {
                    return function(b) {
                        return (b.textContent || b.innerText || e(b)).indexOf(a) > -1
                    }
                }),lang: fb(function(a) {
                    return U.test(a || "") || db.error("unsupported lang: " + a), a = a.replace(ab, bb).toLowerCase(), function(b) {
                        var c;
                        do
                            if (c = n ? b.lang : b.getAttribute("xml:lang") || b.getAttribute("lang"))
                                return c = c.toLowerCase(), c === a || 0 === c.indexOf(a + "-");
                        while ((b = b.parentNode) && 1 === b.nodeType);
                        return !1
                    }
                }),target: function(b) {
                    var c = a.location && a.location.hash;
                    return c && c.slice(1) === b.id
                },root: function(a) {
                    return a === m
                },focus: function(a) {
                    return a === l.activeElement && (!l.hasFocus || l.hasFocus()) && !!(a.type || a.href || ~a.tabIndex)
                },enabled: function(a) {
                    return a.disabled === !1
                },disabled: function(a) {
                    return a.disabled === !0
                },checked: function(a) {
                    var b = a.nodeName.toLowerCase();
                    return "input" === b && !!a.checked || "option" === b && !!a.selected
                },selected: function(a) {
                    return a.parentNode && a.parentNode.selectedIndex, a.selected === !0
                },empty: function(a) {
                    for (a = a.firstChild; a; a = a.nextSibling)
                        if (a.nodeType < 6)
                            return !1;
                    return !0
                },parent: function(a) {
                    return !d.pseudos.empty(a)
                },header: function(a) {
                    return X.test(a.nodeName)
                },input: function(a) {
                    return W.test(a.nodeName)
                },button: function(a) {
                    var b = a.nodeName.toLowerCase();
                    return "input" === b && "button" === a.type || "button" === b
                },text: function(a) {
                    var b;
                    return "input" === a.nodeName.toLowerCase() && "text" === a.type && (null == (b = a.getAttribute("type")) || "text" === b.toLowerCase())
                },first: lb(function() {
                    return [0]
                }),last: lb(function(a, b) {
                    return [b - 1]
                }),eq: lb(function(a, b, c) {
                    return [0 > c ? c + b : c]
                }),even: lb(function(a, b) {
                    for (var c = 0; b > c; c += 2)
                        a.push(c);
                    return a
                }),odd: lb(function(a, b) {
                    for (var c = 1; b > c; c += 2)
                        a.push(c);
                    return a
                }),lt: lb(function(a, b, c) {
                    for (var d = 0 > c ? c + b : c; --d >= 0; )
                        a.push(d);
                    return a
                }),gt: lb(function(a, b, c) {
                    for (var d = 0 > c ? c + b : c; ++d < b; )
                        a.push(d);
                    return a
                })}}, d.pseudos.nth = d.pseudos.eq;
        for (b in {radio: !0,checkbox: !0,file: !0,password: !0,image: !0})
            d.pseudos[b] = jb(b);
        for (b in {submit: !0,reset: !0})
            d.pseudos[b] = kb(b);
        function nb() {
        }
        nb.prototype = d.filters = d.pseudos, d.setFilters = new nb;
        function ob(a, b) {
            var c, e, f, g, h, i, j, k = x[a + " "];
            if (k)
                return b ? 0 : k.slice(0);
            h = a, i = [], j = d.preFilter;
            while (h) {
                (!c || (e = Q.exec(h))) && (e && (h = h.slice(e[0].length) || h), i.push(f = [])), c = !1, (e = R.exec(h)) && (c = e.shift(), f.push({value: c,type: e[0].replace(P, " ")}), h = h.slice(c.length));
                for (g in d.filter)
                    !(e = V[g].exec(h)) || j[g] && !(e = j[g](e)) || (c = e.shift(), f.push({value: c,type: g,matches: e}), h = h.slice(c.length));
                if (!c)
                    break
            }
            return b ? h.length : h ? db.error(a) : x(a, i).slice(0)
        }
        function pb(a) {
            for (var b = 0, c = a.length, d = ""; c > b; b++)
                d += a[b].value;
            return d
        }
        function qb(a, b, c) {
            var d = b.dir, e = c && "parentNode" === d, f = v++;
            return b.first ? function(b, c, f) {
                while (b = b[d])
                    if (1 === b.nodeType || e)
                        return a(b, c, f)
            } : function(b, c, g) {
                var h, i, j = [u, f];
                if (g) {
                    while (b = b[d])
                        if ((1 === b.nodeType || e) && a(b, c, g))
                            return !0
                } else
                    while (b = b[d])
                        if (1 === b.nodeType || e) {
                            if (i = b[s] || (b[s] = {}), (h = i[d]) && h[0] === u && h[1] === f)
                                return j[2] = h[2];
                            if (i[d] = j, j[2] = a(b, c, g))
                                return !0
                        }
            }
        }
        function rb(a) {
            return a.length > 1 ? function(b, c, d) {
                var e = a.length;
                while (e--)
                    if (!a[e](b, c, d))
                        return !1;
                return !0
            } : a[0]
        }
        function sb(a, b, c, d, e) {
            for (var f, g = [], h = 0, i = a.length, j = null != b; i > h; h++)
                (f = a[h]) && (!c || c(f, d, e)) && (g.push(f), j && b.push(h));
            return g
        }
        function tb(a, b, c, d, e, f) {
            return d && !d[s] && (d = tb(d)), e && !e[s] && (e = tb(e, f)), fb(function(f, g, h, i) {
                var j, k, l, m = [], n = [], o = g.length, p = f || wb(b || "*", h.nodeType ? [h] : h, []), q = !a || !f && b ? p : sb(p, m, a, h, i), r = c ? e || (f ? a : o || d) ? [] : g : q;
                if (c && c(q, r, h, i), d) {
                    j = sb(r, n), d(j, [], h, i), k = j.length;
                    while (k--)
                        (l = j[k]) && (r[n[k]] = !(q[n[k]] = l))
                }
                if (f) {
                    if (e || a) {
                        if (e) {
                            j = [], k = r.length;
                            while (k--)
                                (l = r[k]) && j.push(q[k] = l);
                            e(null, r = [], j, i)
                        }
                        k = r.length;
                        while (k--)
                            (l = r[k]) && (j = e ? I.call(f, l) : m[k]) > -1 && (f[j] = !(g[j] = l))
                    }
                } else
                    r = sb(r === g ? r.splice(o, r.length) : r), e ? e(null, g, r, i) : G.apply(g, r)
            })
        }
        function ub(a) {
            for (var b, c, e, f = a.length, g = d.relative[a[0].type], i = g || d.relative[" "], j = g ? 1 : 0, k = qb(function(a) {
                return a === b
            }, i, !0), l = qb(function(a) {
                return I.call(b, a) > -1
            }, i, !0), m = [function(a, c, d) {
                    return !g && (d || c !== h) || ((b = c).nodeType ? k(a, c, d) : l(a, c, d))
                }]; f > j; j++)
                if (c = d.relative[a[j].type])
                    m = [qb(rb(m), c)];
                else {
                    if (c = d.filter[a[j].type].apply(null, a[j].matches), c[s]) {
                        for (e = ++j; f > e; e++)
                            if (d.relative[a[e].type])
                                break;
                        return tb(j > 1 && rb(m), j > 1 && pb(a.slice(0, j - 1).concat({value: " " === a[j - 2].type ? "*" : ""})).replace(P, "$1"), c, e > j && ub(a.slice(j, e)), f > e && ub(a = a.slice(e)), f > e && pb(a))
                    }
                    m.push(c)
                }
            return rb(m)
        }
        function vb(a, b) {
            var c = b.length > 0, e = a.length > 0, f = function(f, g, i, j, k) {
                var m, n, o, p = 0, q = "0", r = f && [], s = [], t = h, v = f || e && d.find.TAG("*", k), w = u += null == t ? 1 : Math.random() || .1, x = v.length;
                for (k && (h = g !== l && g); q !== x && null != (m = v[q]); q++) {
                    if (e && m) {
                        n = 0;
                        while (o = a[n++])
                            if (o(m, g, i)) {
                                j.push(m);
                                break
                            }
                        k && (u = w)
                    }
                    c && ((m = !o && m) && p--, f && r.push(m))
                }
                if (p += q, c && q !== p) {
                    n = 0;
                    while (o = b[n++])
                        o(r, s, g, i);
                    if (f) {
                        if (p > 0)
                            while (q--)
                                r[q] || s[q] || (s[q] = E.call(j));
                        s = sb(s)
                    }
                    G.apply(j, s), k && !f && s.length > 0 && p + b.length > 1 && db.uniqueSort(j)
                }
                return k && (u = w, h = t), r
            };
            return c ? fb(f) : f
        }
        g = db.compile = function(a, b) {
            var c, d = [], e = [], f = y[a + " "];
            if (!f) {
                b || (b = ob(a)), c = b.length;
                while (c--)
                    f = ub(b[c]), f[s] ? d.push(f) : e.push(f);
                f = y(a, vb(e, d))
            }
            return f
        };
        function wb(a, b, c) {
            for (var d = 0, e = b.length; e > d; d++)
                db(a, b[d], c);
            return c
        }
        function xb(a, b, e, f) {
            var h, i, j, k, l, m = ob(a);
            if (!f && 1 === m.length) {
                if (i = m[0] = m[0].slice(0), i.length > 2 && "ID" === (j = i[0]).type && c.getById && 9 === b.nodeType && n && d.relative[i[1].type]) {
                    if (b = (d.find.ID(j.matches[0].replace(ab, bb), b) || [])[0], !b)
                        return e;
                    a = a.slice(i.shift().value.length)
                }
                h = V.needsContext.test(a) ? 0 : i.length;
                while (h--) {
                    if (j = i[h], d.relative[k = j.type])
                        break;
                    if ((l = d.find[k]) && (f = l(j.matches[0].replace(ab, bb), $.test(i[0].type) && mb(b.parentNode) || b))) {
                        if (i.splice(h, 1), a = f.length && pb(i), !a)
                            return G.apply(e, f), e;
                        break
                    }
                }
            }
            return g(a, m)(f, b, !n, e, $.test(a) && mb(b.parentNode) || b), e
        }
        return c.sortStable = s.split("").sort(z).join("") === s, c.detectDuplicates = !!j, k(), c.sortDetached = gb(function(a) {
            return 1 & a.compareDocumentPosition(l.createElement("div"))
        }), gb(function(a) {
            return a.innerHTML = "<a href='#'></a>", "#" === a.firstChild.getAttribute("href")
        }) || hb("type|href|height|width", function(a, b, c) {
            return c ? void 0 : a.getAttribute(b, "type" === b.toLowerCase() ? 1 : 2)
        }), c.attributes && gb(function(a) {
            return a.innerHTML = "<input/>", a.firstChild.setAttribute("value", ""), "" === a.firstChild.getAttribute("value")
        }) || hb("value", function(a, b, c) {
            return c || "input" !== a.nodeName.toLowerCase() ? void 0 : a.defaultValue
        }), gb(function(a) {
            return null == a.getAttribute("disabled")
        }) || hb(J, function(a, b, c) {
            var d;
            return c ? void 0 : a[b] === !0 ? b.toLowerCase() : (d = a.getAttributeNode(b)) && d.specified ? d.value : null
        }), db
    }(a);
    n.find = t, n.expr = t.selectors, n.expr[":"] = n.expr.pseudos, n.unique = t.uniqueSort, n.text = t.getText, n.isXMLDoc = t.isXML, n.contains = t.contains;
    var u = n.expr.match.needsContext, v = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, w = /^.[^:#\[\.,]*$/;
    function x(a, b, c) {
        if (n.isFunction(b))
            return n.grep(a, function(a, d) {
                return !!b.call(a, d, a) !== c
            });
        if (b.nodeType)
            return n.grep(a, function(a) {
                return a === b !== c
            });
        if ("string" == typeof b) {
            if (w.test(b))
                return n.filter(b, a, c);
            b = n.filter(b, a)
        }
        return n.grep(a, function(a) {
            return n.inArray(a, b) >= 0 !== c
        })
    }
    n.filter = function(a, b, c) {
        var d = b[0];
        return c && (a = ":not(" + a + ")"), 1 === b.length && 1 === d.nodeType ? n.find.matchesSelector(d, a) ? [d] : [] : n.find.matches(a, n.grep(b, function(a) {
            return 1 === a.nodeType
        }))
    }, n.fn.extend({find: function(a) {
            var b, c = [], d = this, e = d.length;
            if ("string" != typeof a)
                return this.pushStack(n(a).filter(function() {
                    for (b = 0; e > b; b++)
                        if (n.contains(d[b], this))
                            return !0
                }));
            for (b = 0; e > b; b++)
                n.find(a, d[b], c);
            return c = this.pushStack(e > 1 ? n.unique(c) : c), c.selector = this.selector ? this.selector + " " + a : a, c
        },filter: function(a) {
            return this.pushStack(x(this, a || [], !1))
        },not: function(a) {
            return this.pushStack(x(this, a || [], !0))
        },is: function(a) {
            return !!x(this, "string" == typeof a && u.test(a) ? n(a) : a || [], !1).length
        }});
    var y, z = a.document, A = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, B = n.fn.init = function(a, b) {
        var c, d;
        if (!a)
            return this;
        if ("string" == typeof a) {
            if (c = "<" === a.charAt(0) && ">" === a.charAt(a.length - 1) && a.length >= 3 ? [null, a, null] : A.exec(a), !c || !c[1] && b)
                return !b || b.jquery ? (b || y).find(a) : this.constructor(b).find(a);
            if (c[1]) {
                if (b = b instanceof n ? b[0] : b, n.merge(this, n.parseHTML(c[1], b && b.nodeType ? b.ownerDocument || b : z, !0)), v.test(c[1]) && n.isPlainObject(b))
                    for (c in b)
                        n.isFunction(this[c]) ? this[c](b[c]) : this.attr(c, b[c]);
                return this
            }
            if (d = z.getElementById(c[2]), d && d.parentNode) {
                if (d.id !== c[2])
                    return y.find(a);
                this.length = 1, this[0] = d
            }
            return this.context = z, this.selector = a, this
        }
        return a.nodeType ? (this.context = this[0] = a, this.length = 1, this) : n.isFunction(a) ? "undefined" != typeof y.ready ? y.ready(a) : a(n) : (void 0 !== a.selector && (this.selector = a.selector, this.context = a.context), n.makeArray(a, this))
    };
    B.prototype = n.fn, y = n(z);
    var C = /^(?:parents|prev(?:Until|All))/, D = {children: !0,contents: !0,next: !0,prev: !0};
    n.extend({dir: function(a, b, c) {
            var d = [], e = a[b];
            while (e && 9 !== e.nodeType && (void 0 === c || 1 !== e.nodeType || !n(e).is(c)))
                1 === e.nodeType && d.push(e), e = e[b];
            return d
        },sibling: function(a, b) {
            for (var c = []; a; a = a.nextSibling)
                1 === a.nodeType && a !== b && c.push(a);
            return c
        }}), n.fn.extend({has: function(a) {
            var b, c = n(a, this), d = c.length;
            return this.filter(function() {
                for (b = 0; d > b; b++)
                    if (n.contains(this, c[b]))
                        return !0
            })
        },closest: function(a, b) {
            for (var c, d = 0, e = this.length, f = [], g = u.test(a) || "string" != typeof a ? n(a, b || this.context) : 0; e > d; d++)
                for (c = this[d]; c && c !== b; c = c.parentNode)
                    if (c.nodeType < 11 && (g ? g.index(c) > -1 : 1 === c.nodeType && n.find.matchesSelector(c, a))) {
                        f.push(c);
                        break
                    }
            return this.pushStack(f.length > 1 ? n.unique(f) : f)
        },index: function(a) {
            return a ? "string" == typeof a ? n.inArray(this[0], n(a)) : n.inArray(a.jquery ? a[0] : a, this) : this[0] && this[0].parentNode ? this.first().prevAll().length : -1
        },add: function(a, b) {
            return this.pushStack(n.unique(n.merge(this.get(), n(a, b))))
        },addBack: function(a) {
            return this.add(null == a ? this.prevObject : this.prevObject.filter(a))
        }});
    function E(a, b) {
        do
            a = a[b];
        while (a && 1 !== a.nodeType);
        return a
    }
    n.each({parent: function(a) {
            var b = a.parentNode;
            return b && 11 !== b.nodeType ? b : null
        },parents: function(a) {
            return n.dir(a, "parentNode")
        },parentsUntil: function(a, b, c) {
            return n.dir(a, "parentNode", c)
        },next: function(a) {
            return E(a, "nextSibling")
        },prev: function(a) {
            return E(a, "previousSibling")
        },nextAll: function(a) {
            return n.dir(a, "nextSibling")
        },prevAll: function(a) {
            return n.dir(a, "previousSibling")
        },nextUntil: function(a, b, c) {
            return n.dir(a, "nextSibling", c)
        },prevUntil: function(a, b, c) {
            return n.dir(a, "previousSibling", c)
        },siblings: function(a) {
            return n.sibling((a.parentNode || {}).firstChild, a)
        },children: function(a) {
            return n.sibling(a.firstChild)
        },contents: function(a) {
            return n.nodeName(a, "iframe") ? a.contentDocument || a.contentWindow.document : n.merge([], a.childNodes)
        }}, function(a, b) {
        n.fn[a] = function(c, d) {
            var e = n.map(this, b, c);
            return "Until" !== a.slice(-5) && (d = c), d && "string" == typeof d && (e = n.filter(d, e)), this.length > 1 && (D[a] || (e = n.unique(e)), C.test(a) && (e = e.reverse())), this.pushStack(e)
        }
    });
    var F = /\S+/g, G = {};
    function H(a) {
        var b = G[a] = {};
        return n.each(a.match(F) || [], function(a, c) {
            b[c] = !0
        }), b
    }
    n.Callbacks = function(a) {
        a = "string" == typeof a ? G[a] || H(a) : n.extend({}, a);
        var b, c, d, e, f, g, h = [], i = !a.once && [], j = function(l) {
            for (c = a.memory && l, d = !0, f = g || 0, g = 0, e = h.length, b = !0; h && e > f; f++)
                if (h[f].apply(l[0], l[1]) === !1 && a.stopOnFalse) {
                    c = !1;
                    break
                }
            b = !1, h && (i ? i.length && j(i.shift()) : c ? h = [] : k.disable())
        }, k = {add: function() {
                if (h) {
                    var d = h.length;
                    !function f(b) {
                        n.each(b, function(b, c) {
                            var d = n.type(c);
                            "function" === d ? a.unique && k.has(c) || h.push(c) : c && c.length && "string" !== d && f(c)
                        })
                    }(arguments), b ? e = h.length : c && (g = d, j(c))
                }
                return this
            },remove: function() {
                return h && n.each(arguments, function(a, c) {
                    var d;
                    while ((d = n.inArray(c, h, d)) > -1)
                        h.splice(d, 1), b && (e >= d && e--, f >= d && f--)
                }), this
            },has: function(a) {
                return a ? n.inArray(a, h) > -1 : !(!h || !h.length)
            },empty: function() {
                return h = [], e = 0, this
            },disable: function() {
                return h = i = c = void 0, this
            },disabled: function() {
                return !h
            },lock: function() {
                return i = void 0, c || k.disable(), this
            },locked: function() {
                return !i
            },fireWith: function(a, c) {
                return !h || d && !i || (c = c || [], c = [a, c.slice ? c.slice() : c], b ? i.push(c) : j(c)), this
            },fire: function() {
                return k.fireWith(this, arguments), this
            },fired: function() {
                return !!d
            }};
        return k
    }, n.extend({Deferred: function(a) {
            var b = [["resolve", "done", n.Callbacks("once memory"), "resolved"], ["reject", "fail", n.Callbacks("once memory"), "rejected"], ["notify", "progress", n.Callbacks("memory")]], c = "pending", d = {state: function() {
                    return c
                },always: function() {
                    return e.done(arguments).fail(arguments), this
                },then: function() {
                    var a = arguments;
                    return n.Deferred(function(c) {
                        n.each(b, function(b, f) {
                            var g = n.isFunction(a[b]) && a[b];
                            e[f[1]](function() {
                                var a = g && g.apply(this, arguments);
                                a && n.isFunction(a.promise) ? a.promise().done(c.resolve).fail(c.reject).progress(c.notify) : c[f[0] + "With"](this === d ? c.promise() : this, g ? [a] : arguments)
                            })
                        }), a = null
                    }).promise()
                },promise: function(a) {
                    return null != a ? n.extend(a, d) : d
                }}, e = {};
            return d.pipe = d.then, n.each(b, function(a, f) {
                var g = f[2], h = f[3];
                d[f[1]] = g.add, h && g.add(function() {
                    c = h
                }, b[1 ^ a][2].disable, b[2][2].lock), e[f[0]] = function() {
                    return e[f[0] + "With"](this === e ? d : this, arguments), this
                }, e[f[0] + "With"] = g.fireWith
            }), d.promise(e), a && a.call(e, e), e
        },when: function(a) {
            var b = 0, c = d.call(arguments), e = c.length, f = 1 !== e || a && n.isFunction(a.promise) ? e : 0, g = 1 === f ? a : n.Deferred(), h = function(a, b, c) {
                return function(e) {
                    b[a] = this, c[a] = arguments.length > 1 ? d.call(arguments) : e, c === i ? g.notifyWith(b, c) : --f || g.resolveWith(b, c)
                }
            }, i, j, k;
            if (e > 1)
                for (i = new Array(e), j = new Array(e), k = new Array(e); e > b; b++)
                    c[b] && n.isFunction(c[b].promise) ? c[b].promise().done(h(b, k, c)).fail(g.reject).progress(h(b, j, i)) : --f;
            return f || g.resolveWith(k, c), g.promise()
        }});
    var I;
    n.fn.ready = function(a) {
        return n.ready.promise().done(a), this
    }, n.extend({isReady: !1,readyWait: 1,holdReady: function(a) {
            a ? n.readyWait++ : n.ready(!0)
        },ready: function(a) {
            if (a === !0 ? !--n.readyWait : !n.isReady) {
                if (!z.body)
                    return setTimeout(n.ready);
                n.isReady = !0, a !== !0 && --n.readyWait > 0 || (I.resolveWith(z, [n]), n.fn.trigger && n(z).trigger("ready").off("ready"))
            }
        }});
    function J() {
        z.addEventListener ? (z.removeEventListener("DOMContentLoaded", K, !1), a.removeEventListener("load", K, !1)) : (z.detachEvent("onreadystatechange", K), a.detachEvent("onload", K))
    }
    function K() {
        (z.addEventListener || "load" === event.type || "complete" === z.readyState) && (J(), n.ready())
    }
    n.ready.promise = function(b) {
        if (!I)
            if (I = n.Deferred(), "complete" === z.readyState)
                setTimeout(n.ready);
            else if (z.addEventListener)
                z.addEventListener("DOMContentLoaded", K, !1), a.addEventListener("load", K, !1);
            else {
                z.attachEvent("onreadystatechange", K), a.attachEvent("onload", K);
                var c = !1;
                try {
                    c = null == a.frameElement && z.documentElement
                } catch (d) {
                }
                c && c.doScroll && !function e() {
                    if (!n.isReady) {
                        try {
                            c.doScroll("left")
                        } catch (a) {
                            return setTimeout(e, 50)
                        }
                        J(), n.ready()
                    }
                }()
            }
        return I.promise(b)
    };
    var L = "undefined", M;
    for (M in n(l))
        break;
    l.ownLast = "0" !== M, l.inlineBlockNeedsLayout = !1, n(function() {
        var a, b, c = z.getElementsByTagName("body")[0];
        c && (a = z.createElement("div"), a.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px", b = z.createElement("div"), c.appendChild(a).appendChild(b), typeof b.style.zoom !== L && (b.style.cssText = "border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1", (l.inlineBlockNeedsLayout = 3 === b.offsetWidth) && (c.style.zoom = 1)), c.removeChild(a), a = b = null)
    }), function() {
        var a = z.createElement("div");
        if (null == l.deleteExpando) {
            l.deleteExpando = !0;
            try {
                delete a.test
            } catch (b) {
                l.deleteExpando = !1
            }
        }
        a = null
    }(), n.acceptData = function(a) {
        var b = n.noData[(a.nodeName + " ").toLowerCase()], c = +a.nodeType || 1;
        return 1 !== c && 9 !== c ? !1 : !b || b !== !0 && a.getAttribute("classid") === b
    };
    var N = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, O = /([A-Z])/g;
    function P(a, b, c) {
        if (void 0 === c && 1 === a.nodeType) {
            var d = "data-" + b.replace(O, "-$1").toLowerCase();
            if (c = a.getAttribute(d), "string" == typeof c) {
                try {
                    c = "true" === c ? !0 : "false" === c ? !1 : "null" === c ? null : +c + "" === c ? +c : N.test(c) ? n.parseJSON(c) : c
                } catch (e) {
                }
                n.data(a, b, c)
            } else
                c = void 0
        }
        return c
    }
    function Q(a) {
        var b;
        for (b in a)
            if (("data" !== b || !n.isEmptyObject(a[b])) && "toJSON" !== b)
                return !1;
        return !0
    }
    function R(a, b, d, e) {
        if (n.acceptData(a)) {
            var f, g, h = n.expando, i = a.nodeType, j = i ? n.cache : a, k = i ? a[h] : a[h] && h;
            if (k && j[k] && (e || j[k].data) || void 0 !== d || "string" != typeof b)
                return k || (k = i ? a[h] = c.pop() || n.guid++ : h), j[k] || (j[k] = i ? {} : {toJSON: n.noop}), ("object" == typeof b || "function" == typeof b) && (e ? j[k] = n.extend(j[k], b) : j[k].data = n.extend(j[k].data, b)), g = j[k], e || (g.data || (g.data = {}), g = g.data), void 0 !== d && (g[n.camelCase(b)] = d), "string" == typeof b ? (f = g[b], null == f && (f = g[n.camelCase(b)])) : f = g, f
        }
    }
    function S(a, b, c) {
        if (n.acceptData(a)) {
            var d, e, f = a.nodeType, g = f ? n.cache : a, h = f ? a[n.expando] : n.expando;
            if (g[h]) {
                if (b && (d = c ? g[h] : g[h].data)) {
                    n.isArray(b) ? b = b.concat(n.map(b, n.camelCase)) : b in d ? b = [b] : (b = n.camelCase(b), b = b in d ? [b] : b.split(" ")), e = b.length;
                    while (e--)
                        delete d[b[e]];
                    if (c ? !Q(d) : !n.isEmptyObject(d))
                        return
                }
                (c || (delete g[h].data, Q(g[h]))) && (f ? n.cleanData([a], !0) : l.deleteExpando || g != g.window ? delete g[h] : g[h] = null)
            }
        }
    }
    n.extend({cache: {},noData: {"applet ": !0,"embed ": !0,"object ": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData: function(a) {
            return a = a.nodeType ? n.cache[a[n.expando]] : a[n.expando], !!a && !Q(a)
        },data: function(a, b, c) {
            return R(a, b, c)
        },removeData: function(a, b) {
            return S(a, b)
        },_data: function(a, b, c) {
            return R(a, b, c, !0)
        },_removeData: function(a, b) {
            return S(a, b, !0)
        }}), n.fn.extend({data: function(a, b) {
            var c, d, e, f = this[0], g = f && f.attributes;
            if (void 0 === a) {
                if (this.length && (e = n.data(f), 1 === f.nodeType && !n._data(f, "parsedAttrs"))) {
                    c = g.length;
                    while (c--)
                        d = g[c].name, 0 === d.indexOf("data-") && (d = n.camelCase(d.slice(5)), P(f, d, e[d]));
                    n._data(f, "parsedAttrs", !0)
                }
                return e
            }
            return "object" == typeof a ? this.each(function() {
                n.data(this, a)
            }) : arguments.length > 1 ? this.each(function() {
                n.data(this, a, b)
            }) : f ? P(f, a, n.data(f, a)) : void 0
        },removeData: function(a) {
            return this.each(function() {
                n.removeData(this, a)
            })
        }}), n.extend({queue: function(a, b, c) {
            var d;
            return a ? (b = (b || "fx") + "queue", d = n._data(a, b), c && (!d || n.isArray(c) ? d = n._data(a, b, n.makeArray(c)) : d.push(c)), d || []) : void 0
        },dequeue: function(a, b) {
            b = b || "fx";
            var c = n.queue(a, b), d = c.length, e = c.shift(), f = n._queueHooks(a, b), g = function() {
                n.dequeue(a, b)
            };
            "inprogress" === e && (e = c.shift(), d--), e && ("fx" === b && c.unshift("inprogress"), delete f.stop, e.call(a, g, f)), !d && f && f.empty.fire()
        },_queueHooks: function(a, b) {
            var c = b + "queueHooks";
            return n._data(a, c) || n._data(a, c, {empty: n.Callbacks("once memory").add(function() {
                    n._removeData(a, b + "queue"), n._removeData(a, c)
                })})
        }}), n.fn.extend({queue: function(a, b) {
            var c = 2;
            return "string" != typeof a && (b = a, a = "fx", c--), arguments.length < c ? n.queue(this[0], a) : void 0 === b ? this : this.each(function() {
                var c = n.queue(this, a, b);
                n._queueHooks(this, a), "fx" === a && "inprogress" !== c[0] && n.dequeue(this, a)
            })
        },dequeue: function(a) {
            return this.each(function() {
                n.dequeue(this, a)
            })
        },clearQueue: function(a) {
            return this.queue(a || "fx", [])
        },promise: function(a, b) {
            var c, d = 1, e = n.Deferred(), f = this, g = this.length, h = function() {
                --d || e.resolveWith(f, [f])
            };
            "string" != typeof a && (b = a, a = void 0), a = a || "fx";
            while (g--)
                c = n._data(f[g], a + "queueHooks"), c && c.empty && (d++, c.empty.add(h));
            return h(), e.promise(b)
        }});
    var T = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, U = ["Top", "Right", "Bottom", "Left"], V = function(a, b) {
        return a = b || a, "none" === n.css(a, "display") || !n.contains(a.ownerDocument, a)
    }, W = n.access = function(a, b, c, d, e, f, g) {
        var h = 0, i = a.length, j = null == c;
        if ("object" === n.type(c)) {
            e = !0;
            for (h in c)
                n.access(a, b, h, c[h], !0, f, g)
        } else if (void 0 !== d && (e = !0, n.isFunction(d) || (g = !0), j && (g ? (b.call(a, d), b = null) : (j = b, b = function(a, b, c) {
            return j.call(n(a), c)
        })), b))
            for (; i > h; h++)
                b(a[h], c, g ? d : d.call(a[h], h, b(a[h], c)));
        return e ? a : j ? b.call(a) : i ? b(a[0], c) : f
    }, X = /^(?:checkbox|radio)$/i;
    !function() {
        var a = z.createDocumentFragment(), b = z.createElement("div"), c = z.createElement("input");
        if (b.setAttribute("className", "t"), b.innerHTML = "  <link/><table></table><a href='/a'>a</a>", l.leadingWhitespace = 3 === b.firstChild.nodeType, l.tbody = !b.getElementsByTagName("tbody").length, l.htmlSerialize = !!b.getElementsByTagName("link").length, l.html5Clone = "<:nav></:nav>" !== z.createElement("nav").cloneNode(!0).outerHTML, c.type = "checkbox", c.checked = !0, a.appendChild(c), l.appendChecked = c.checked, b.innerHTML = "<textarea>x</textarea>", l.noCloneChecked = !!b.cloneNode(!0).lastChild.defaultValue, a.appendChild(b), b.innerHTML = "<input type='radio' checked='checked' name='t'/>", l.checkClone = b.cloneNode(!0).cloneNode(!0).lastChild.checked, l.noCloneEvent = !0, b.attachEvent && (b.attachEvent("onclick", function() {
            l.noCloneEvent = !1
        }), b.cloneNode(!0).click()), null == l.deleteExpando) {
            l.deleteExpando = !0;
            try {
                delete b.test
            } catch (d) {
                l.deleteExpando = !1
            }
        }
        a = b = c = null
    }(), function() {
        var b, c, d = z.createElement("div");
        for (b in {submit: !0,change: !0,focusin: !0})
            c = "on" + b, (l[b + "Bubbles"] = c in a) || (d.setAttribute(c, "t"), l[b + "Bubbles"] = d.attributes[c].expando === !1);
        d = null
    }();
    var Y = /^(?:input|select|textarea)$/i, Z = /^key/, $ = /^(?:mouse|contextmenu)|click/, _ = /^(?:focusinfocus|focusoutblur)$/, ab = /^([^.]*)(?:\.(.+)|)$/;
    function bb() {
        return !0
    }
    function cb() {
        return !1
    }
    function db() {
        try {
            return z.activeElement
        } catch (a) {
        }
    }
    n.event = {global: {},add: function(a, b, c, d, e) {
            var f, g, h, i, j, k, l, m, o, p, q, r = n._data(a);
            if (r) {
                c.handler && (i = c, c = i.handler, e = i.selector), c.guid || (c.guid = n.guid++), (g = r.events) || (g = r.events = {}), (k = r.handle) || (k = r.handle = function(a) {
                    return typeof n === L || a && n.event.triggered === a.type ? void 0 : n.event.dispatch.apply(k.elem, arguments)
                }, k.elem = a), b = (b || "").match(F) || [""], h = b.length;
                while (h--)
                    f = ab.exec(b[h]) || [], o = q = f[1], p = (f[2] || "").split(".").sort(), o && (j = n.event.special[o] || {}, o = (e ? j.delegateType : j.bindType) || o, j = n.event.special[o] || {}, l = n.extend({type: o,origType: q,data: d,handler: c,guid: c.guid,selector: e,needsContext: e && n.expr.match.needsContext.test(e),namespace: p.join(".")}, i), (m = g[o]) || (m = g[o] = [], m.delegateCount = 0, j.setup && j.setup.call(a, d, p, k) !== !1 || (a.addEventListener ? a.addEventListener(o, k, !1) : a.attachEvent && a.attachEvent("on" + o, k))), j.add && (j.add.call(a, l), l.handler.guid || (l.handler.guid = c.guid)), e ? m.splice(m.delegateCount++, 0, l) : m.push(l), n.event.global[o] = !0);
                a = null
            }
        },remove: function(a, b, c, d, e) {
            var f, g, h, i, j, k, l, m, o, p, q, r = n.hasData(a) && n._data(a);
            if (r && (k = r.events)) {
                b = (b || "").match(F) || [""], j = b.length;
                while (j--)
                    if (h = ab.exec(b[j]) || [], o = q = h[1], p = (h[2] || "").split(".").sort(), o) {
                        l = n.event.special[o] || {}, o = (d ? l.delegateType : l.bindType) || o, m = k[o] || [], h = h[2] && new RegExp("(^|\\.)" + p.join("\\.(?:.*\\.|)") + "(\\.|$)"), i = f = m.length;
                        while (f--)
                            g = m[f], !e && q !== g.origType || c && c.guid !== g.guid || h && !h.test(g.namespace) || d && d !== g.selector && ("**" !== d || !g.selector) || (m.splice(f, 1), g.selector && m.delegateCount--, l.remove && l.remove.call(a, g));
                        i && !m.length && (l.teardown && l.teardown.call(a, p, r.handle) !== !1 || n.removeEvent(a, o, r.handle), delete k[o])
                    } else
                        for (o in k)
                            n.event.remove(a, o + b[j], c, d, !0);
                n.isEmptyObject(k) && (delete r.handle, n._removeData(a, "events"))
            }
        },trigger: function(b, c, d, e) {
            var f, g, h, i, k, l, m, o = [d || z], p = j.call(b, "type") ? b.type : b, q = j.call(b, "namespace") ? b.namespace.split(".") : [];
            if (h = l = d = d || z, 3 !== d.nodeType && 8 !== d.nodeType && !_.test(p + n.event.triggered) && (p.indexOf(".") >= 0 && (q = p.split("."), p = q.shift(), q.sort()), g = p.indexOf(":") < 0 && "on" + p, b = b[n.expando] ? b : new n.Event(p, "object" == typeof b && b), b.isTrigger = e ? 2 : 3, b.namespace = q.join("."), b.namespace_re = b.namespace ? new RegExp("(^|\\.)" + q.join("\\.(?:.*\\.|)") + "(\\.|$)") : null, b.result = void 0, b.target || (b.target = d), c = null == c ? [b] : n.makeArray(c, [b]), k = n.event.special[p] || {}, e || !k.trigger || k.trigger.apply(d, c) !== !1)) {
                if (!e && !k.noBubble && !n.isWindow(d)) {
                    for (i = k.delegateType || p, _.test(i + p) || (h = h.parentNode); h; h = h.parentNode)
                        o.push(h), l = h;
                    l === (d.ownerDocument || z) && o.push(l.defaultView || l.parentWindow || a)
                }
                m = 0;
                while ((h = o[m++]) && !b.isPropagationStopped())
                    b.type = m > 1 ? i : k.bindType || p, f = (n._data(h, "events") || {})[b.type] && n._data(h, "handle"), f && f.apply(h, c), f = g && h[g], f && f.apply && n.acceptData(h) && (b.result = f.apply(h, c), b.result === !1 && b.preventDefault());
                if (b.type = p, !e && !b.isDefaultPrevented() && (!k._default || k._default.apply(o.pop(), c) === !1) && n.acceptData(d) && g && d[p] && !n.isWindow(d)) {
                    l = d[g], l && (d[g] = null), n.event.triggered = p;
                    try {
                        d[p]()
                    } catch (r) {
                    }
                    n.event.triggered = void 0, l && (d[g] = l)
                }
                return b.result
            }
        },dispatch: function(a) {
            a = n.event.fix(a);
            var b, c, e, f, g, h = [], i = d.call(arguments), j = (n._data(this, "events") || {})[a.type] || [], k = n.event.special[a.type] || {};
            if (i[0] = a, a.delegateTarget = this, !k.preDispatch || k.preDispatch.call(this, a) !== !1) {
                h = n.event.handlers.call(this, a, j), b = 0;
                while ((f = h[b++]) && !a.isPropagationStopped()) {
                    a.currentTarget = f.elem, g = 0;
                    while ((e = f.handlers[g++]) && !a.isImmediatePropagationStopped())
                        (!a.namespace_re || a.namespace_re.test(e.namespace)) && (a.handleObj = e, a.data = e.data, c = ((n.event.special[e.origType] || {}).handle || e.handler).apply(f.elem, i), void 0 !== c && (a.result = c) === !1 && (a.preventDefault(), a.stopPropagation()))
                }
                return k.postDispatch && k.postDispatch.call(this, a), a.result
            }
        },handlers: function(a, b) {
            var c, d, e, f, g = [], h = b.delegateCount, i = a.target;
            if (h && i.nodeType && (!a.button || "click" !== a.type))
                for (; i != this; i = i.parentNode || this)
                    if (1 === i.nodeType && (i.disabled !== !0 || "click" !== a.type)) {
                        for (e = [], f = 0; h > f; f++)
                            d = b[f], c = d.selector + " ", void 0 === e[c] && (e[c] = d.needsContext ? n(c, this).index(i) >= 0 : n.find(c, this, null, [i]).length), e[c] && e.push(d);
                        e.length && g.push({elem: i,handlers: e})
                    }
            return h < b.length && g.push({elem: this,handlers: b.slice(h)}), g
        },fix: function(a) {
            if (a[n.expando])
                return a;
            var b, c, d, e = a.type, f = a, g = this.fixHooks[e];
            g || (this.fixHooks[e] = g = $.test(e) ? this.mouseHooks : Z.test(e) ? this.keyHooks : {}), d = g.props ? this.props.concat(g.props) : this.props, a = new n.Event(f), b = d.length;
            while (b--)
                c = d[b], a[c] = f[c];
            return a.target || (a.target = f.srcElement || z), 3 === a.target.nodeType && (a.target = a.target.parentNode), a.metaKey = !!a.metaKey, g.filter ? g.filter(a, f) : a
        },props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks: {},keyHooks: {props: "char charCode key keyCode".split(" "),filter: function(a, b) {
                return null == a.which && (a.which = null != b.charCode ? b.charCode : b.keyCode), a
            }},mouseHooks: {props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter: function(a, b) {
                var c, d, e, f = b.button, g = b.fromElement;
                return null == a.pageX && null != b.clientX && (d = a.target.ownerDocument || z, e = d.documentElement, c = d.body, a.pageX = b.clientX + (e && e.scrollLeft || c && c.scrollLeft || 0) - (e && e.clientLeft || c && c.clientLeft || 0), a.pageY = b.clientY + (e && e.scrollTop || c && c.scrollTop || 0) - (e && e.clientTop || c && c.clientTop || 0)), !a.relatedTarget && g && (a.relatedTarget = g === a.target ? b.toElement : g), a.which || void 0 === f || (a.which = 1 & f ? 1 : 2 & f ? 3 : 4 & f ? 2 : 0), a
            }},special: {load: {noBubble: !0},focus: {trigger: function() {
                    if (this !== db() && this.focus)
                        try {
                            return this.focus(), !1
                        } catch (a) {
                        }
                },delegateType: "focusin"},blur: {trigger: function() {
                    return this === db() && this.blur ? (this.blur(), !1) : void 0
                },delegateType: "focusout"},click: {trigger: function() {
                    return n.nodeName(this, "input") && "checkbox" === this.type && this.click ? (this.click(), !1) : void 0
                },_default: function(a) {
                    return n.nodeName(a.target, "a")
                }},beforeunload: {postDispatch: function(a) {
                    void 0 !== a.result && (a.originalEvent.returnValue = a.result)
                }}},simulate: function(a, b, c, d) {
            var e = n.extend(new n.Event, c, {type: a,isSimulated: !0,originalEvent: {}});
            d ? n.event.trigger(e, null, b) : n.event.dispatch.call(b, e), e.isDefaultPrevented() && c.preventDefault()
        }}, n.removeEvent = z.removeEventListener ? function(a, b, c) {
        a.removeEventListener && a.removeEventListener(b, c, !1)
    } : function(a, b, c) {
        var d = "on" + b;
        a.detachEvent && (typeof a[d] === L && (a[d] = null), a.detachEvent(d, c))
    }, n.Event = function(a, b) {
        return this instanceof n.Event ? (a && a.type ? (this.originalEvent = a, this.type = a.type, this.isDefaultPrevented = a.defaultPrevented || void 0 === a.defaultPrevented && (a.returnValue === !1 || a.getPreventDefault && a.getPreventDefault()) ? bb : cb) : this.type = a, b && n.extend(this, b), this.timeStamp = a && a.timeStamp || n.now(), void (this[n.expando] = !0)) : new n.Event(a, b)
    }, n.Event.prototype = {isDefaultPrevented: cb,isPropagationStopped: cb,isImmediatePropagationStopped: cb,preventDefault: function() {
            var a = this.originalEvent;
            this.isDefaultPrevented = bb, a && (a.preventDefault ? a.preventDefault() : a.returnValue = !1)
        },stopPropagation: function() {
            var a = this.originalEvent;
            this.isPropagationStopped = bb, a && (a.stopPropagation && a.stopPropagation(), a.cancelBubble = !0)
        },stopImmediatePropagation: function() {
            this.isImmediatePropagationStopped = bb, this.stopPropagation()
        }}, n.each({mouseenter: "mouseover",mouseleave: "mouseout"}, function(a, b) {
        n.event.special[a] = {delegateType: b,bindType: b,handle: function(a) {
                var c, d = this, e = a.relatedTarget, f = a.handleObj;
                return (!e || e !== d && !n.contains(d, e)) && (a.type = f.origType, c = f.handler.apply(this, arguments), a.type = b), c
            }}
    }), l.submitBubbles || (n.event.special.submit = {setup: function() {
            return n.nodeName(this, "form") ? !1 : void n.event.add(this, "click._submit keypress._submit", function(a) {
                var b = a.target, c = n.nodeName(b, "input") || n.nodeName(b, "button") ? b.form : void 0;
                c && !n._data(c, "submitBubbles") && (n.event.add(c, "submit._submit", function(a) {
                    a._submit_bubble = !0
                }), n._data(c, "submitBubbles", !0))
            })
        },postDispatch: function(a) {
            a._submit_bubble && (delete a._submit_bubble, this.parentNode && !a.isTrigger && n.event.simulate("submit", this.parentNode, a, !0))
        },teardown: function() {
            return n.nodeName(this, "form") ? !1 : void n.event.remove(this, "._submit")
        }}), l.changeBubbles || (n.event.special.change = {setup: function() {
            return Y.test(this.nodeName) ? (("checkbox" === this.type || "radio" === this.type) && (n.event.add(this, "propertychange._change", function(a) {
                "checked" === a.originalEvent.propertyName && (this._just_changed = !0)
            }), n.event.add(this, "click._change", function(a) {
                this._just_changed && !a.isTrigger && (this._just_changed = !1), n.event.simulate("change", this, a, !0)
            })), !1) : void n.event.add(this, "beforeactivate._change", function(a) {
                var b = a.target;
                Y.test(b.nodeName) && !n._data(b, "changeBubbles") && (n.event.add(b, "change._change", function(a) {
                    !this.parentNode || a.isSimulated || a.isTrigger || n.event.simulate("change", this.parentNode, a, !0)
                }), n._data(b, "changeBubbles", !0))
            })
        },handle: function(a) {
            var b = a.target;
            return this !== b || a.isSimulated || a.isTrigger || "radio" !== b.type && "checkbox" !== b.type ? a.handleObj.handler.apply(this, arguments) : void 0
        },teardown: function() {
            return n.event.remove(this, "._change"), !Y.test(this.nodeName)
        }}), l.focusinBubbles || n.each({focus: "focusin",blur: "focusout"}, function(a, b) {
        var c = function(a) {
            n.event.simulate(b, a.target, n.event.fix(a), !0)
        };
        n.event.special[b] = {setup: function() {
                var d = this.ownerDocument || this, e = n._data(d, b);
                e || d.addEventListener(a, c, !0), n._data(d, b, (e || 0) + 1)
            },teardown: function() {
                var d = this.ownerDocument || this, e = n._data(d, b) - 1;
                e ? n._data(d, b, e) : (d.removeEventListener(a, c, !0), n._removeData(d, b))
            }}
    }), n.fn.extend({on: function(a, b, c, d, e) {
            var f, g;
            if ("object" == typeof a) {
                "string" != typeof b && (c = c || b, b = void 0);
                for (f in a)
                    this.on(f, b, c, a[f], e);
                return this
            }
            if (null == c && null == d ? (d = b, c = b = void 0) : null == d && ("string" == typeof b ? (d = c, c = void 0) : (d = c, c = b, b = void 0)), d === !1)
                d = cb;
            else if (!d)
                return this;
            return 1 === e && (g = d, d = function(a) {
                return n().off(a), g.apply(this, arguments)
            }, d.guid = g.guid || (g.guid = n.guid++)), this.each(function() {
                n.event.add(this, a, d, c, b)
            })
        },one: function(a, b, c, d) {
            return this.on(a, b, c, d, 1)
        },off: function(a, b, c) {
            var d, e;
            if (a && a.preventDefault && a.handleObj)
                return d = a.handleObj, n(a.delegateTarget).off(d.namespace ? d.origType + "." + d.namespace : d.origType, d.selector, d.handler), this;
            if ("object" == typeof a) {
                for (e in a)
                    this.off(e, b, a[e]);
                return this
            }
            return (b === !1 || "function" == typeof b) && (c = b, b = void 0), c === !1 && (c = cb), this.each(function() {
                n.event.remove(this, a, c, b)
            })
        },trigger: function(a, b) {
            return this.each(function() {
                n.event.trigger(a, b, this)
            })
        },triggerHandler: function(a, b) {
            var c = this[0];
            return c ? n.event.trigger(a, b, c, !0) : void 0
        }});
    function eb(a) {
        var b = fb.split("|"), c = a.createDocumentFragment();
        if (c.createElement)
            while (b.length)
                c.createElement(b.pop());
        return c
    }
    var fb = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", gb = / jQuery\d+="(?:null|\d+)"/g, hb = new RegExp("<(?:" + fb + ")[\\s/>]", "i"), ib = /^\s+/, jb = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, kb = /<([\w:]+)/, lb = /<tbody/i, mb = /<|&#?\w+;/, nb = /<(?:script|style|link)/i, ob = /checked\s*(?:[^=]|=\s*.checked.)/i, pb = /^$|\/(?:java|ecma)script/i, qb = /^true\/(.*)/, rb = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, sb = {option: [1, "<select multiple='multiple'>", "</select>"],legend: [1, "<fieldset>", "</fieldset>"],area: [1, "<map>", "</map>"],param: [1, "<object>", "</object>"],thead: [1, "<table>", "</table>"],tr: [2, "<table><tbody>", "</tbody></table>"],col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],_default: l.htmlSerialize ? [0, "", ""] : [1, "X<div>", "</div>"]}, tb = eb(z), ub = tb.appendChild(z.createElement("div"));
    sb.optgroup = sb.option, sb.tbody = sb.tfoot = sb.colgroup = sb.caption = sb.thead, sb.th = sb.td;
    function vb(a, b) {
        var c, d, e = 0, f = typeof a.getElementsByTagName !== L ? a.getElementsByTagName(b || "*") : typeof a.querySelectorAll !== L ? a.querySelectorAll(b || "*") : void 0;
        if (!f)
            for (f = [], c = a.childNodes || a; null != (d = c[e]); e++)
                !b || n.nodeName(d, b) ? f.push(d) : n.merge(f, vb(d, b));
        return void 0 === b || b && n.nodeName(a, b) ? n.merge([a], f) : f
    }
    function wb(a) {
        X.test(a.type) && (a.defaultChecked = a.checked)
    }
    function xb(a, b) {
        return n.nodeName(a, "table") && n.nodeName(11 !== b.nodeType ? b : b.firstChild, "tr") ? a.getElementsByTagName("tbody")[0] || a.appendChild(a.ownerDocument.createElement("tbody")) : a
    }
    function yb(a) {
        return a.type = (null !== n.find.attr(a, "type")) + "/" + a.type, a
    }
    function zb(a) {
        var b = qb.exec(a.type);
        return b ? a.type = b[1] : a.removeAttribute("type"), a
    }
    function Ab(a, b) {
        for (var c, d = 0; null != (c = a[d]); d++)
            n._data(c, "globalEval", !b || n._data(b[d], "globalEval"))
    }
    function Bb(a, b) {
        if (1 === b.nodeType && n.hasData(a)) {
            var c, d, e, f = n._data(a), g = n._data(b, f), h = f.events;
            if (h) {
                delete g.handle, g.events = {};
                for (c in h)
                    for (d = 0, e = h[c].length; e > d; d++)
                        n.event.add(b, c, h[c][d])
            }
            g.data && (g.data = n.extend({}, g.data))
        }
    }
    function Cb(a, b) {
        var c, d, e;
        if (1 === b.nodeType) {
            if (c = b.nodeName.toLowerCase(), !l.noCloneEvent && b[n.expando]) {
                e = n._data(b);
                for (d in e.events)
                    n.removeEvent(b, d, e.handle);
                b.removeAttribute(n.expando)
            }
            "script" === c && b.text !== a.text ? (yb(b).text = a.text, zb(b)) : "object" === c ? (b.parentNode && (b.outerHTML = a.outerHTML), l.html5Clone && a.innerHTML && !n.trim(b.innerHTML) && (b.innerHTML = a.innerHTML)) : "input" === c && X.test(a.type) ? (b.defaultChecked = b.checked = a.checked, b.value !== a.value && (b.value = a.value)) : "option" === c ? b.defaultSelected = b.selected = a.defaultSelected : ("input" === c || "textarea" === c) && (b.defaultValue = a.defaultValue)
        }
    }
    n.extend({clone: function(a, b, c) {
            var d, e, f, g, h, i = n.contains(a.ownerDocument, a);
            if (l.html5Clone || n.isXMLDoc(a) || !hb.test("<" + a.nodeName + ">") ? f = a.cloneNode(!0) : (ub.innerHTML = a.outerHTML, ub.removeChild(f = ub.firstChild)), !(l.noCloneEvent && l.noCloneChecked || 1 !== a.nodeType && 11 !== a.nodeType || n.isXMLDoc(a)))
                for (d = vb(f), h = vb(a), g = 0; null != (e = h[g]); ++g)
                    d[g] && Cb(e, d[g]);
            if (b)
                if (c)
                    for (h = h || vb(a), d = d || vb(f), g = 0; null != (e = h[g]); g++)
                        Bb(e, d[g]);
                else
                    Bb(a, f);
            return d = vb(f, "script"), d.length > 0 && Ab(d, !i && vb(a, "script")), d = h = e = null, f
        },buildFragment: function(a, b, c, d) {
            for (var e, f, g, h, i, j, k, m = a.length, o = eb(b), p = [], q = 0; m > q; q++)
                if (f = a[q], f || 0 === f)
                    if ("object" === n.type(f))
                        n.merge(p, f.nodeType ? [f] : f);
                    else if (mb.test(f)) {
                        h = h || o.appendChild(b.createElement("div")), i = (kb.exec(f) || ["", ""])[1].toLowerCase(), k = sb[i] || sb._default, h.innerHTML = k[1] + f.replace(jb, "<$1></$2>") + k[2], e = k[0];
                        while (e--)
                            h = h.lastChild;
                        if (!l.leadingWhitespace && ib.test(f) && p.push(b.createTextNode(ib.exec(f)[0])), !l.tbody) {
                            f = "table" !== i || lb.test(f) ? "<table>" !== k[1] || lb.test(f) ? 0 : h : h.firstChild, e = f && f.childNodes.length;
                            while (e--)
                                n.nodeName(j = f.childNodes[e], "tbody") && !j.childNodes.length && f.removeChild(j)
                        }
                        n.merge(p, h.childNodes), h.textContent = "";
                        while (h.firstChild)
                            h.removeChild(h.firstChild);
                        h = o.lastChild
                    } else
                        p.push(b.createTextNode(f));
            h && o.removeChild(h), l.appendChecked || n.grep(vb(p, "input"), wb), q = 0;
            while (f = p[q++])
                if ((!d || -1 === n.inArray(f, d)) && (g = n.contains(f.ownerDocument, f), h = vb(o.appendChild(f), "script"), g && Ab(h), c)) {
                    e = 0;
                    while (f = h[e++])
                        pb.test(f.type || "") && c.push(f)
                }
            return h = null, o
        },cleanData: function(a, b) {
            for (var d, e, f, g, h = 0, i = n.expando, j = n.cache, k = l.deleteExpando, m = n.event.special; null != (d = a[h]); h++)
                if ((b || n.acceptData(d)) && (f = d[i], g = f && j[f])) {
                    if (g.events)
                        for (e in g.events)
                            m[e] ? n.event.remove(d, e) : n.removeEvent(d, e, g.handle);
                    j[f] && (delete j[f], k ? delete d[i] : typeof d.removeAttribute !== L ? d.removeAttribute(i) : d[i] = null, c.push(f))
                }
        }}), n.fn.extend({text: function(a) {
            return W(this, function(a) {
                return void 0 === a ? n.text(this) : this.empty().append((this[0] && this[0].ownerDocument || z).createTextNode(a))
            }, null, a, arguments.length)
        },append: function() {
            return this.domManip(arguments, function(a) {
                if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
                    var b = xb(this, a);
                    b.appendChild(a)
                }
            })
        },prepend: function() {
            return this.domManip(arguments, function(a) {
                if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) {
                    var b = xb(this, a);
                    b.insertBefore(a, b.firstChild)
                }
            })
        },before: function() {
            return this.domManip(arguments, function(a) {
                this.parentNode && this.parentNode.insertBefore(a, this)
            })
        },after: function() {
            return this.domManip(arguments, function(a) {
                this.parentNode && this.parentNode.insertBefore(a, this.nextSibling)
            })
        },remove: function(a, b) {
            for (var c, d = a ? n.filter(a, this) : this, e = 0; null != (c = d[e]); e++)
                b || 1 !== c.nodeType || n.cleanData(vb(c)), c.parentNode && (b && n.contains(c.ownerDocument, c) && Ab(vb(c, "script")), c.parentNode.removeChild(c));
            return this
        },empty: function() {
            for (var a, b = 0; null != (a = this[b]); b++) {
                1 === a.nodeType && n.cleanData(vb(a, !1));
                while (a.firstChild)
                    a.removeChild(a.firstChild);
                a.options && n.nodeName(a, "select") && (a.options.length = 0)
            }
            return this
        },clone: function(a, b) {
            return a = null == a ? !1 : a, b = null == b ? a : b, this.map(function() {
                return n.clone(this, a, b)
            })
        },html: function(a) {
            return W(this, function(a) {
                var b = this[0] || {}, c = 0, d = this.length;
                if (void 0 === a)
                    return 1 === b.nodeType ? b.innerHTML.replace(gb, "") : void 0;
                if (!("string" != typeof a || nb.test(a) || !l.htmlSerialize && hb.test(a) || !l.leadingWhitespace && ib.test(a) || sb[(kb.exec(a) || ["", ""])[1].toLowerCase()])) {
                    a = a.replace(jb, "<$1></$2>");
                    try {
                        for (; d > c; c++)
                            b = this[c] || {}, 1 === b.nodeType && (n.cleanData(vb(b, !1)), b.innerHTML = a);
                        b = 0
                    } catch (e) {
                    }
                }
                b && this.empty().append(a)
            }, null, a, arguments.length)
        },replaceWith: function() {
            var a = arguments[0];
            return this.domManip(arguments, function(b) {
                a = this.parentNode, n.cleanData(vb(this)), a && a.replaceChild(b, this)
            }), a && (a.length || a.nodeType) ? this : this.remove()
        },detach: function(a) {
            return this.remove(a, !0)
        },domManip: function(a, b) {
            a = e.apply([], a);
            var c, d, f, g, h, i, j = 0, k = this.length, m = this, o = k - 1, p = a[0], q = n.isFunction(p);
            if (q || k > 1 && "string" == typeof p && !l.checkClone && ob.test(p))
                return this.each(function(c) {
                    var d = m.eq(c);
                    q && (a[0] = p.call(this, c, d.html())), d.domManip(a, b)
                });
            if (k && (i = n.buildFragment(a, this[0].ownerDocument, !1, this), c = i.firstChild, 1 === i.childNodes.length && (i = c), c)) {
                for (g = n.map(vb(i, "script"), yb), f = g.length; k > j; j++)
                    d = i, j !== o && (d = n.clone(d, !0, !0), f && n.merge(g, vb(d, "script"))), b.call(this[j], d, j);
                if (f)
                    for (h = g[g.length - 1].ownerDocument, n.map(g, zb), j = 0; f > j; j++)
                        d = g[j], pb.test(d.type || "") && !n._data(d, "globalEval") && n.contains(h, d) && (d.src ? n._evalUrl && n._evalUrl(d.src) : n.globalEval((d.text || d.textContent || d.innerHTML || "").replace(rb, "")));
                i = c = null
            }
            return this
        }}), n.each({appendTo: "append",prependTo: "prepend",insertBefore: "before",insertAfter: "after",replaceAll: "replaceWith"}, function(a, b) {
        n.fn[a] = function(a) {
            for (var c, d = 0, e = [], g = n(a), h = g.length - 1; h >= d; d++)
                c = d === h ? this : this.clone(!0), n(g[d])[b](c), f.apply(e, c.get());
            return this.pushStack(e)
        }
    });
    var Db, Eb = {};
    function Fb(b, c) {
        var d = n(c.createElement(b)).appendTo(c.body), e = a.getDefaultComputedStyle ? a.getDefaultComputedStyle(d[0]).display : n.css(d[0], "display");
        return d.detach(), e
    }
    function Gb(a) {
        var b = z, c = Eb[a];
        return c || (c = Fb(a, b), "none" !== c && c || (Db = (Db || n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement), b = (Db[0].contentWindow || Db[0].contentDocument).document, b.write(), b.close(), c = Fb(a, b), Db.detach()), Eb[a] = c), c
    }
    !function() {
        var a, b, c = z.createElement("div"), d = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";
        c.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", a = c.getElementsByTagName("a")[0], a.style.cssText = "float:left;opacity:.5", l.opacity = /^0.5/.test(a.style.opacity), l.cssFloat = !!a.style.cssFloat, c.style.backgroundClip = "content-box", c.cloneNode(!0).style.backgroundClip = "", l.clearCloneStyle = "content-box" === c.style.backgroundClip, a = c = null, l.shrinkWrapBlocks = function() {
            var a, c, e, f;
            if (null == b) {
                if (a = z.getElementsByTagName("body")[0], !a)
                    return;
                f = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px", c = z.createElement("div"), e = z.createElement("div"), a.appendChild(c).appendChild(e), b = !1, typeof e.style.zoom !== L && (e.style.cssText = d + ";width:1px;padding:1px;zoom:1", e.innerHTML = "<div></div>", e.firstChild.style.width = "5px", b = 3 !== e.offsetWidth), a.removeChild(c), a = c = e = null
            }
            return b
        }
    }();
    var Hb = /^margin/, Ib = new RegExp("^(" + T + ")(?!px)[a-z%]+$", "i"), Jb, Kb, Lb = /^(top|right|bottom|left)$/;
    a.getComputedStyle ? (Jb = function(a) {
        return a.ownerDocument.defaultView.getComputedStyle(a, null)
    }, Kb = function(a, b, c) {
        var d, e, f, g, h = a.style;
        return c = c || Jb(a), g = c ? c.getPropertyValue(b) || c[b] : void 0, c && ("" !== g || n.contains(a.ownerDocument, a) || (g = n.style(a, b)), Ib.test(g) && Hb.test(b) && (d = h.width, e = h.minWidth, f = h.maxWidth, h.minWidth = h.maxWidth = h.width = g, g = c.width, h.width = d, h.minWidth = e, h.maxWidth = f)), void 0 === g ? g : g + ""
    }) : z.documentElement.currentStyle && (Jb = function(a) {
        return a.currentStyle
    }, Kb = function(a, b, c) {
        var d, e, f, g, h = a.style;
        return c = c || Jb(a), g = c ? c[b] : void 0, null == g && h && h[b] && (g = h[b]), Ib.test(g) && !Lb.test(b) && (d = h.left, e = a.runtimeStyle, f = e && e.left, f && (e.left = a.currentStyle.left), h.left = "fontSize" === b ? "1em" : g, g = h.pixelLeft + "px", h.left = d, f && (e.left = f)), void 0 === g ? g : g + "" || "auto"
    });
    function Mb(a, b) {
        return {get: function() {
                var c = a();
                if (null != c)
                    return c ? void delete this.get : (this.get = b).apply(this, arguments)
            }}
    }
    !function() {
        var b, c, d, e, f, g, h = z.createElement("div"), i = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px", j = "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";
        h.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", b = h.getElementsByTagName("a")[0], b.style.cssText = "float:left;opacity:.5", l.opacity = /^0.5/.test(b.style.opacity), l.cssFloat = !!b.style.cssFloat, h.style.backgroundClip = "content-box", h.cloneNode(!0).style.backgroundClip = "", l.clearCloneStyle = "content-box" === h.style.backgroundClip, b = h = null, n.extend(l, {reliableHiddenOffsets: function() {
                if (null != c)
                    return c;
                var a, b, d, e = z.createElement("div"), f = z.getElementsByTagName("body")[0];
                if (f)
                    return e.setAttribute("className", "t"), e.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", a = z.createElement("div"), a.style.cssText = i, f.appendChild(a).appendChild(e), e.innerHTML = "<table><tr><td></td><td>t</td></tr></table>", b = e.getElementsByTagName("td"), b[0].style.cssText = "padding:0;margin:0;border:0;display:none", d = 0 === b[0].offsetHeight, b[0].style.display = "", b[1].style.display = "none", c = d && 0 === b[0].offsetHeight, f.removeChild(a), e = f = null, c
            },boxSizing: function() {
                return null == d && k(), d
            },boxSizingReliable: function() {
                return null == e && k(), e
            },pixelPosition: function() {
                return null == f && k(), f
            },reliableMarginRight: function() {
                var b, c, d, e;
                if (null == g && a.getComputedStyle) {
                    if (b = z.getElementsByTagName("body")[0], !b)
                        return;
                    c = z.createElement("div"), d = z.createElement("div"), c.style.cssText = i, b.appendChild(c).appendChild(d), e = d.appendChild(z.createElement("div")), e.style.cssText = d.style.cssText = j, e.style.marginRight = e.style.width = "0", d.style.width = "1px", g = !parseFloat((a.getComputedStyle(e, null) || {}).marginRight), b.removeChild(c)
                }
                return g
            }});
        function k() {
            var b, c, h = z.getElementsByTagName("body")[0];
            h && (b = z.createElement("div"), c = z.createElement("div"), b.style.cssText = i, h.appendChild(b).appendChild(c), c.style.cssText = "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%", n.swap(h, null != h.style.zoom ? {zoom: 1} : {}, function() {
                d = 4 === c.offsetWidth
            }), e = !0, f = !1, g = !0, a.getComputedStyle && (f = "1%" !== (a.getComputedStyle(c, null) || {}).top, e = "4px" === (a.getComputedStyle(c, null) || {width: "4px"}).width), h.removeChild(b), c = h = null)
        }
    }(), n.swap = function(a, b, c, d) {
        var e, f, g = {};
        for (f in b)
            g[f] = a.style[f], a.style[f] = b[f];
        e = c.apply(a, d || []);
        for (f in b)
            a.style[f] = g[f];
        return e
    };
    var Nb = /alpha\([^)]*\)/i, Ob = /opacity\s*=\s*([^)]*)/, Pb = /^(none|table(?!-c[ea]).+)/, Qb = new RegExp("^(" + T + ")(.*)$", "i"), Rb = new RegExp("^([+-])=(" + T + ")", "i"), Sb = {position: "absolute",visibility: "hidden",display: "block"}, Tb = {letterSpacing: 0,fontWeight: 400}, Ub = ["Webkit", "O", "Moz", "ms"];
    function Vb(a, b) {
        if (b in a)
            return b;
        var c = b.charAt(0).toUpperCase() + b.slice(1), d = b, e = Ub.length;
        while (e--)
            if (b = Ub[e] + c, b in a)
                return b;
        return d
    }
    function Wb(a, b) {
        for (var c, d, e, f = [], g = 0, h = a.length; h > g; g++)
            d = a[g], d.style && (f[g] = n._data(d, "olddisplay"), c = d.style.display, b ? (f[g] || "none" !== c || (d.style.display = ""), "" === d.style.display && V(d) && (f[g] = n._data(d, "olddisplay", Gb(d.nodeName)))) : f[g] || (e = V(d), (c && "none" !== c || !e) && n._data(d, "olddisplay", e ? c : n.css(d, "display"))));
        for (g = 0; h > g; g++)
            d = a[g], d.style && (b && "none" !== d.style.display && "" !== d.style.display || (d.style.display = b ? f[g] || "" : "none"));
        return a
    }
    function Xb(a, b, c) {
        var d = Qb.exec(b);
        return d ? Math.max(0, d[1] - (c || 0)) + (d[2] || "px") : b
    }
    function Yb(a, b, c, d, e) {
        for (var f = c === (d ? "border" : "content") ? 4 : "width" === b ? 1 : 0, g = 0; 4 > f; f += 2)
            "margin" === c && (g += n.css(a, c + U[f], !0, e)), d ? ("content" === c && (g -= n.css(a, "padding" + U[f], !0, e)), "margin" !== c && (g -= n.css(a, "border" + U[f] + "Width", !0, e))) : (g += n.css(a, "padding" + U[f], !0, e), "padding" !== c && (g += n.css(a, "border" + U[f] + "Width", !0, e)));
        return g
    }
    function Zb(a, b, c) {
        var d = !0, e = "width" === b ? a.offsetWidth : a.offsetHeight, f = Jb(a), g = l.boxSizing() && "border-box" === n.css(a, "boxSizing", !1, f);
        if (0 >= e || null == e) {
            if (e = Kb(a, b, f), (0 > e || null == e) && (e = a.style[b]), Ib.test(e))
                return e;
            d = g && (l.boxSizingReliable() || e === a.style[b]), e = parseFloat(e) || 0
        }
        return e + Yb(a, b, c || (g ? "border" : "content"), d, f) + "px"
    }
    n.extend({cssHooks: {opacity: {get: function(a, b) {
                    if (b) {
                        var c = Kb(a, "opacity");
                        return "" === c ? "1" : c
                    }
                }}},cssNumber: {columnCount: !0,fillOpacity: !0,fontWeight: !0,lineHeight: !0,opacity: !0,order: !0,orphans: !0,widows: !0,zIndex: !0,zoom: !0},cssProps: {"float": l.cssFloat ? "cssFloat" : "styleFloat"},style: function(a, b, c, d) {
            if (a && 3 !== a.nodeType && 8 !== a.nodeType && a.style) {
                var e, f, g, h = n.camelCase(b), i = a.style;
                if (b = n.cssProps[h] || (n.cssProps[h] = Vb(i, h)), g = n.cssHooks[b] || n.cssHooks[h], void 0 === c)
                    return g && "get" in g && void 0 !== (e = g.get(a, !1, d)) ? e : i[b];
                if (f = typeof c, "string" === f && (e = Rb.exec(c)) && (c = (e[1] + 1) * e[2] + parseFloat(n.css(a, b)), f = "number"), null != c && c === c && ("number" !== f || n.cssNumber[h] || (c += "px"), l.clearCloneStyle || "" !== c || 0 !== b.indexOf("background") || (i[b] = "inherit"), !(g && "set" in g && void 0 === (c = g.set(a, c, d)))))
                    try {
                        i[b] = "", i[b] = c
                    } catch (j) {
                    }
            }
        },css: function(a, b, c, d) {
            var e, f, g, h = n.camelCase(b);
            return b = n.cssProps[h] || (n.cssProps[h] = Vb(a.style, h)), g = n.cssHooks[b] || n.cssHooks[h], g && "get" in g && (f = g.get(a, !0, c)), void 0 === f && (f = Kb(a, b, d)), "normal" === f && b in Tb && (f = Tb[b]), "" === c || c ? (e = parseFloat(f), c === !0 || n.isNumeric(e) ? e || 0 : f) : f
        }}), n.each(["height", "width"], function(a, b) {
        n.cssHooks[b] = {get: function(a, c, d) {
                return c ? 0 === a.offsetWidth && Pb.test(n.css(a, "display")) ? n.swap(a, Sb, function() {
                    return Zb(a, b, d)
                }) : Zb(a, b, d) : void 0
            },set: function(a, c, d) {
                var e = d && Jb(a);
                return Xb(a, c, d ? Yb(a, b, d, l.boxSizing() && "border-box" === n.css(a, "boxSizing", !1, e), e) : 0)
            }}
    }), l.opacity || (n.cssHooks.opacity = {get: function(a, b) {
            return Ob.test((b && a.currentStyle ? a.currentStyle.filter : a.style.filter) || "") ? .01 * parseFloat(RegExp.$1) + "" : b ? "1" : ""
        },set: function(a, b) {
            var c = a.style, d = a.currentStyle, e = n.isNumeric(b) ? "alpha(opacity=" + 100 * b + ")" : "", f = d && d.filter || c.filter || "";
            c.zoom = 1, (b >= 1 || "" === b) && "" === n.trim(f.replace(Nb, "")) && c.removeAttribute && (c.removeAttribute("filter"), "" === b || d && !d.filter) || (c.filter = Nb.test(f) ? f.replace(Nb, e) : f + " " + e)
        }}), n.cssHooks.marginRight = Mb(l.reliableMarginRight, function(a, b) {
        return b ? n.swap(a, {display: "inline-block"}, Kb, [a, "marginRight"]) : void 0
    }), n.each({margin: "",padding: "",border: "Width"}, function(a, b) {
        n.cssHooks[a + b] = {expand: function(c) {
                for (var d = 0, e = {}, f = "string" == typeof c ? c.split(" ") : [c]; 4 > d; d++)
                    e[a + U[d] + b] = f[d] || f[d - 2] || f[0];
                return e
            }}, Hb.test(a) || (n.cssHooks[a + b].set = Xb)
    }), n.fn.extend({css: function(a, b) {
            return W(this, function(a, b, c) {
                var d, e, f = {}, g = 0;
                if (n.isArray(b)) {
                    for (d = Jb(a), e = b.length; e > g; g++)
                        f[b[g]] = n.css(a, b[g], !1, d);
                    return f
                }
                return void 0 !== c ? n.style(a, b, c) : n.css(a, b)
            }, a, b, arguments.length > 1)
        },show: function() {
            return Wb(this, !0)
        },hide: function() {
            return Wb(this)
        },toggle: function(a) {
            return "boolean" == typeof a ? a ? this.show() : this.hide() : this.each(function() {
                V(this) ? n(this).show() : n(this).hide()
            })
        }});
    function $b(a, b, c, d, e) {
        return new $b.prototype.init(a, b, c, d, e)
    }
    n.Tween = $b, $b.prototype = {constructor: $b,init: function(a, b, c, d, e, f) {
            this.elem = a, this.prop = c, this.easing = e || "swing", this.options = b, this.start = this.now = this.cur(), this.end = d, this.unit = f || (n.cssNumber[c] ? "" : "px")
        },cur: function() {
            var a = $b.propHooks[this.prop];
            return a && a.get ? a.get(this) : $b.propHooks._default.get(this)
        },run: function(a) {
            var b, c = $b.propHooks[this.prop];
            return this.pos = b = this.options.duration ? n.easing[this.easing](a, this.options.duration * a, 0, 1, this.options.duration) : a, this.now = (this.end - this.start) * b + this.start, this.options.step && this.options.step.call(this.elem, this.now, this), c && c.set ? c.set(this) : $b.propHooks._default.set(this), this
        }}, $b.prototype.init.prototype = $b.prototype, $b.propHooks = {_default: {get: function(a) {
                var b;
                return null == a.elem[a.prop] || a.elem.style && null != a.elem.style[a.prop] ? (b = n.css(a.elem, a.prop, ""), b && "auto" !== b ? b : 0) : a.elem[a.prop]
            },set: function(a) {
                n.fx.step[a.prop] ? n.fx.step[a.prop](a) : a.elem.style && (null != a.elem.style[n.cssProps[a.prop]] || n.cssHooks[a.prop]) ? n.style(a.elem, a.prop, a.now + a.unit) : a.elem[a.prop] = a.now
            }}}, $b.propHooks.scrollTop = $b.propHooks.scrollLeft = {set: function(a) {
            a.elem.nodeType && a.elem.parentNode && (a.elem[a.prop] = a.now)
        }}, n.easing = {linear: function(a) {
            return a
        },swing: function(a) {
            return .5 - Math.cos(a * Math.PI) / 2
        }}, n.fx = $b.prototype.init, n.fx.step = {};
    var _b, ac, bc = /^(?:toggle|show|hide)$/, cc = new RegExp("^(?:([+-])=|)(" + T + ")([a-z%]*)$", "i"), dc = /queueHooks$/, ec = [jc], fc = {"*": [function(a, b) {
                var c = this.createTween(a, b), d = c.cur(), e = cc.exec(b), f = e && e[3] || (n.cssNumber[a] ? "" : "px"), g = (n.cssNumber[a] || "px" !== f && +d) && cc.exec(n.css(c.elem, a)), h = 1, i = 20;
                if (g && g[3] !== f) {
                    f = f || g[3], e = e || [], g = +d || 1;
                    do
                        h = h || ".5", g /= h, n.style(c.elem, a, g + f);
                    while (h !== (h = c.cur() / d) && 1 !== h && --i)
                }
                return e && (g = c.start = +g || +d || 0, c.unit = f, c.end = e[1] ? g + (e[1] + 1) * e[2] : +e[2]), c
            }]};
    function gc() {
        return setTimeout(function() {
            _b = void 0
        }), _b = n.now()
    }
    function hc(a, b) {
        var c, d = {height: a}, e = 0;
        for (b = b ? 1 : 0; 4 > e; e += 2 - b)
            c = U[e], d["margin" + c] = d["padding" + c] = a;
        return b && (d.opacity = d.width = a), d
    }
    function ic(a, b, c) {
        for (var d, e = (fc[b] || []).concat(fc["*"]), f = 0, g = e.length; g > f; f++)
            if (d = e[f].call(c, b, a))
                return d
    }
    function jc(a, b, c) {
        var d, e, f, g, h, i, j, k, m = this, o = {}, p = a.style, q = a.nodeType && V(a), r = n._data(a, "fxshow");
        c.queue || (h = n._queueHooks(a, "fx"), null == h.unqueued && (h.unqueued = 0, i = h.empty.fire, h.empty.fire = function() {
            h.unqueued || i()
        }), h.unqueued++, m.always(function() {
            m.always(function() {
                h.unqueued--, n.queue(a, "fx").length || h.empty.fire()
            })
        })), 1 === a.nodeType && ("height" in b || "width" in b) && (c.overflow = [p.overflow, p.overflowX, p.overflowY], j = n.css(a, "display"), k = Gb(a.nodeName), "none" === j && (j = k), "inline" === j && "none" === n.css(a, "float") && (l.inlineBlockNeedsLayout && "inline" !== k ? p.zoom = 1 : p.display = "inline-block")), c.overflow && (p.overflow = "hidden", l.shrinkWrapBlocks() || m.always(function() {
            p.overflow = c.overflow[0], p.overflowX = c.overflow[1], p.overflowY = c.overflow[2]
        }));
        for (d in b)
            if (e = b[d], bc.exec(e)) {
                if (delete b[d], f = f || "toggle" === e, e === (q ? "hide" : "show")) {
                    if ("show" !== e || !r || void 0 === r[d])
                        continue;
                    q = !0
                }
                o[d] = r && r[d] || n.style(a, d)
            }
        if (!n.isEmptyObject(o)) {
            r ? "hidden" in r && (q = r.hidden) : r = n._data(a, "fxshow", {}), f && (r.hidden = !q), q ? n(a).show() : m.done(function() {
                n(a).hide()
            }), m.done(function() {
                var b;
                n._removeData(a, "fxshow");
                for (b in o)
                    n.style(a, b, o[b])
            });
            for (d in o)
                g = ic(q ? r[d] : 0, d, m), d in r || (r[d] = g.start, q && (g.end = g.start, g.start = "width" === d || "height" === d ? 1 : 0))
        }
    }
    function kc(a, b) {
        var c, d, e, f, g;
        for (c in a)
            if (d = n.camelCase(c), e = b[d], f = a[c], n.isArray(f) && (e = f[1], f = a[c] = f[0]), c !== d && (a[d] = f, delete a[c]), g = n.cssHooks[d], g && "expand" in g) {
                f = g.expand(f), delete a[d];
                for (c in f)
                    c in a || (a[c] = f[c], b[c] = e)
            } else
                b[d] = e
    }
    function lc(a, b, c) {
        var d, e, f = 0, g = ec.length, h = n.Deferred().always(function() {
            delete i.elem
        }), i = function() {
            if (e)
                return !1;
            for (var b = _b || gc(), c = Math.max(0, j.startTime + j.duration - b), d = c / j.duration || 0, f = 1 - d, g = 0, i = j.tweens.length; i > g; g++)
                j.tweens[g].run(f);
            return h.notifyWith(a, [j, f, c]), 1 > f && i ? c : (h.resolveWith(a, [j]), !1)
        }, j = h.promise({elem: a,props: n.extend({}, b),opts: n.extend(!0, {specialEasing: {}}, c),originalProperties: b,originalOptions: c,startTime: _b || gc(),duration: c.duration,tweens: [],createTween: function(b, c) {
                var d = n.Tween(a, j.opts, b, c, j.opts.specialEasing[b] || j.opts.easing);
                return j.tweens.push(d), d
            },stop: function(b) {
                var c = 0, d = b ? j.tweens.length : 0;
                if (e)
                    return this;
                for (e = !0; d > c; c++)
                    j.tweens[c].run(1);
                return b ? h.resolveWith(a, [j, b]) : h.rejectWith(a, [j, b]), this
            }}), k = j.props;
        for (kc(k, j.opts.specialEasing); g > f; f++)
            if (d = ec[f].call(j, a, k, j.opts))
                return d;
        return n.map(k, ic, j), n.isFunction(j.opts.start) && j.opts.start.call(a, j), n.fx.timer(n.extend(i, {elem: a,anim: j,queue: j.opts.queue})), j.progress(j.opts.progress).done(j.opts.done, j.opts.complete).fail(j.opts.fail).always(j.opts.always)
    }
    n.Animation = n.extend(lc, {tweener: function(a, b) {
            n.isFunction(a) ? (b = a, a = ["*"]) : a = a.split(" ");
            for (var c, d = 0, e = a.length; e > d; d++)
                c = a[d], fc[c] = fc[c] || [], fc[c].unshift(b)
        },prefilter: function(a, b) {
            b ? ec.unshift(a) : ec.push(a)
        }}), n.speed = function(a, b, c) {
        var d = a && "object" == typeof a ? n.extend({}, a) : {complete: c || !c && b || n.isFunction(a) && a,duration: a,easing: c && b || b && !n.isFunction(b) && b};
        return d.duration = n.fx.off ? 0 : "number" == typeof d.duration ? d.duration : d.duration in n.fx.speeds ? n.fx.speeds[d.duration] : n.fx.speeds._default, (null == d.queue || d.queue === !0) && (d.queue = "fx"), d.old = d.complete, d.complete = function() {
            n.isFunction(d.old) && d.old.call(this), d.queue && n.dequeue(this, d.queue)
        }, d
    }, n.fn.extend({fadeTo: function(a, b, c, d) {
            return this.filter(V).css("opacity", 0).show().end().animate({opacity: b}, a, c, d)
        },animate: function(a, b, c, d) {
            var e = n.isEmptyObject(a), f = n.speed(b, c, d), g = function() {
                var b = lc(this, n.extend({}, a), f);
                (e || n._data(this, "finish")) && b.stop(!0)
            };
            return g.finish = g, e || f.queue === !1 ? this.each(g) : this.queue(f.queue, g)
        },stop: function(a, b, c) {
            var d = function(a) {
                var b = a.stop;
                delete a.stop, b(c)
            };
            return "string" != typeof a && (c = b, b = a, a = void 0), b && a !== !1 && this.queue(a || "fx", []), this.each(function() {
                var b = !0, e = null != a && a + "queueHooks", f = n.timers, g = n._data(this);
                if (e)
                    g[e] && g[e].stop && d(g[e]);
                else
                    for (e in g)
                        g[e] && g[e].stop && dc.test(e) && d(g[e]);
                for (e = f.length; e--; )
                    f[e].elem !== this || null != a && f[e].queue !== a || (f[e].anim.stop(c), b = !1, f.splice(e, 1));
                (b || !c) && n.dequeue(this, a)
            })
        },finish: function(a) {
            return a !== !1 && (a = a || "fx"), this.each(function() {
                var b, c = n._data(this), d = c[a + "queue"], e = c[a + "queueHooks"], f = n.timers, g = d ? d.length : 0;
                for (c.finish = !0, n.queue(this, a, []), e && e.stop && e.stop.call(this, !0), b = f.length; b--; )
                    f[b].elem === this && f[b].queue === a && (f[b].anim.stop(!0), f.splice(b, 1));
                for (b = 0; g > b; b++)
                    d[b] && d[b].finish && d[b].finish.call(this);
                delete c.finish
            })
        }}), n.each(["toggle", "show", "hide"], function(a, b) {
        var c = n.fn[b];
        n.fn[b] = function(a, d, e) {
            return null == a || "boolean" == typeof a ? c.apply(this, arguments) : this.animate(hc(b, !0), a, d, e)
        }
    }), n.each({slideDown: hc("show"),slideUp: hc("hide"),slideToggle: hc("toggle"),fadeIn: {opacity: "show"},fadeOut: {opacity: "hide"},fadeToggle: {opacity: "toggle"}}, function(a, b) {
        n.fn[a] = function(a, c, d) {
            return this.animate(b, a, c, d)
        }
    }), n.timers = [], n.fx.tick = function() {
        var a, b = n.timers, c = 0;
        for (_b = n.now(); c < b.length; c++)
            a = b[c], a() || b[c] !== a || b.splice(c--, 1);
        b.length || n.fx.stop(), _b = void 0
    }, n.fx.timer = function(a) {
        n.timers.push(a), a() ? n.fx.start() : n.timers.pop()
    }, n.fx.interval = 13, n.fx.start = function() {
        ac || (ac = setInterval(n.fx.tick, n.fx.interval))
    }, n.fx.stop = function() {
        clearInterval(ac), ac = null
    }, n.fx.speeds = {slow: 600,fast: 200,_default: 400}, n.fn.delay = function(a, b) {
        return a = n.fx ? n.fx.speeds[a] || a : a, b = b || "fx", this.queue(b, function(b, c) {
            var d = setTimeout(b, a);
            c.stop = function() {
                clearTimeout(d)
            }
        })
    }, function() {
        var a, b, c, d, e = z.createElement("div");
        e.setAttribute("className", "t"), e.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>", a = e.getElementsByTagName("a")[0], c = z.createElement("select"), d = c.appendChild(z.createElement("option")), b = e.getElementsByTagName("input")[0], a.style.cssText = "top:1px", l.getSetAttribute = "t" !== e.className, l.style = /top/.test(a.getAttribute("style")), l.hrefNormalized = "/a" === a.getAttribute("href"), l.checkOn = !!b.value, l.optSelected = d.selected, l.enctype = !!z.createElement("form").enctype, c.disabled = !0, l.optDisabled = !d.disabled, b = z.createElement("input"), b.setAttribute("value", ""), l.input = "" === b.getAttribute("value"), b.value = "t", b.setAttribute("type", "radio"), l.radioValue = "t" === b.value, a = b = c = d = e = null
    }();
    var mc = /\r/g;
    n.fn.extend({val: function(a) {
            var b, c, d, e = this[0];
            {
                if (arguments.length)
                    return d = n.isFunction(a), this.each(function(c) {
                        var e;
                        1 === this.nodeType && (e = d ? a.call(this, c, n(this).val()) : a, null == e ? e = "" : "number" == typeof e ? e += "" : n.isArray(e) && (e = n.map(e, function(a) {
                            return null == a ? "" : a + ""
                        })), b = n.valHooks[this.type] || n.valHooks[this.nodeName.toLowerCase()], b && "set" in b && void 0 !== b.set(this, e, "value") || (this.value = e))
                    });
                if (e)
                    return b = n.valHooks[e.type] || n.valHooks[e.nodeName.toLowerCase()], b && "get" in b && void 0 !== (c = b.get(e, "value")) ? c : (c = e.value, "string" == typeof c ? c.replace(mc, "") : null == c ? "" : c)
            }
        }}), n.extend({valHooks: {option: {get: function(a) {
                    var b = n.find.attr(a, "value");
                    return null != b ? b : n.text(a)
                }},select: {get: function(a) {
                    for (var b, c, d = a.options, e = a.selectedIndex, f = "select-one" === a.type || 0 > e, g = f ? null : [], h = f ? e + 1 : d.length, i = 0 > e ? h : f ? e : 0; h > i; i++)
                        if (c = d[i], !(!c.selected && i !== e || (l.optDisabled ? c.disabled : null !== c.getAttribute("disabled")) || c.parentNode.disabled && n.nodeName(c.parentNode, "optgroup"))) {
                            if (b = n(c).val(), f)
                                return b;
                            g.push(b)
                        }
                    return g
                },set: function(a, b) {
                    var c, d, e = a.options, f = n.makeArray(b), g = e.length;
                    while (g--)
                        if (d = e[g], n.inArray(n.valHooks.option.get(d), f) >= 0)
                            try {
                                d.selected = c = !0
                            } catch (h) {
                                d.scrollHeight
                            }
                        else
                            d.selected = !1;
                    return c || (a.selectedIndex = -1), e
                }}}}), n.each(["radio", "checkbox"], function() {
        n.valHooks[this] = {set: function(a, b) {
                return n.isArray(b) ? a.checked = n.inArray(n(a).val(), b) >= 0 : void 0
            }}, l.checkOn || (n.valHooks[this].get = function(a) {
            return null === a.getAttribute("value") ? "on" : a.value
        })
    });
    var nc, oc, pc = n.expr.attrHandle, qc = /^(?:checked|selected)$/i, rc = l.getSetAttribute, sc = l.input;
    n.fn.extend({attr: function(a, b) {
            return W(this, n.attr, a, b, arguments.length > 1)
        },removeAttr: function(a) {
            return this.each(function() {
                n.removeAttr(this, a)
            })
        }}), n.extend({attr: function(a, b, c) {
            var d, e, f = a.nodeType;
            if (a && 3 !== f && 8 !== f && 2 !== f)
                return typeof a.getAttribute === L ? n.prop(a, b, c) : (1 === f && n.isXMLDoc(a) || (b = b.toLowerCase(), d = n.attrHooks[b] || (n.expr.match.bool.test(b) ? oc : nc)), void 0 === c ? d && "get" in d && null !== (e = d.get(a, b)) ? e : (e = n.find.attr(a, b), null == e ? void 0 : e) : null !== c ? d && "set" in d && void 0 !== (e = d.set(a, c, b)) ? e : (a.setAttribute(b, c + ""), c) : void n.removeAttr(a, b))
        },removeAttr: function(a, b) {
            var c, d, e = 0, f = b && b.match(F);
            if (f && 1 === a.nodeType)
                while (c = f[e++])
                    d = n.propFix[c] || c, n.expr.match.bool.test(c) ? sc && rc || !qc.test(c) ? a[d] = !1 : a[n.camelCase("default-" + c)] = a[d] = !1 : n.attr(a, c, ""), a.removeAttribute(rc ? c : d)
        },attrHooks: {type: {set: function(a, b) {
                    if (!l.radioValue && "radio" === b && n.nodeName(a, "input")) {
                        var c = a.value;
                        return a.setAttribute("type", b), c && (a.value = c), b
                    }
                }}}}), oc = {set: function(a, b, c) {
            return b === !1 ? n.removeAttr(a, c) : sc && rc || !qc.test(c) ? a.setAttribute(!rc && n.propFix[c] || c, c) : a[n.camelCase("default-" + c)] = a[c] = !0, c
        }}, n.each(n.expr.match.bool.source.match(/\w+/g), function(a, b) {
        var c = pc[b] || n.find.attr;
        pc[b] = sc && rc || !qc.test(b) ? function(a, b, d) {
            var e, f;
            return d || (f = pc[b], pc[b] = e, e = null != c(a, b, d) ? b.toLowerCase() : null, pc[b] = f), e
        } : function(a, b, c) {
            return c ? void 0 : a[n.camelCase("default-" + b)] ? b.toLowerCase() : null
        }
    }), sc && rc || (n.attrHooks.value = {set: function(a, b, c) {
            return n.nodeName(a, "input") ? void (a.defaultValue = b) : nc && nc.set(a, b, c)
        }}), rc || (nc = {set: function(a, b, c) {
            var d = a.getAttributeNode(c);
            return d || a.setAttributeNode(d = a.ownerDocument.createAttribute(c)), d.value = b += "", "value" === c || b === a.getAttribute(c) ? b : void 0
        }}, pc.id = pc.name = pc.coords = function(a, b, c) {
        var d;
        return c ? void 0 : (d = a.getAttributeNode(b)) && "" !== d.value ? d.value : null
    }, n.valHooks.button = {get: function(a, b) {
            var c = a.getAttributeNode(b);
            return c && c.specified ? c.value : void 0
        },set: nc.set}, n.attrHooks.contenteditable = {set: function(a, b, c) {
            nc.set(a, "" === b ? !1 : b, c)
        }}, n.each(["width", "height"], function(a, b) {
        n.attrHooks[b] = {set: function(a, c) {
                return "" === c ? (a.setAttribute(b, "auto"), c) : void 0
            }}
    })), l.style || (n.attrHooks.style = {get: function(a) {
            return a.style.cssText || void 0
        },set: function(a, b) {
            return a.style.cssText = b + ""
        }});
    var tc = /^(?:input|select|textarea|button|object)$/i, uc = /^(?:a|area)$/i;
    n.fn.extend({prop: function(a, b) {
            return W(this, n.prop, a, b, arguments.length > 1)
        },removeProp: function(a) {
            return a = n.propFix[a] || a, this.each(function() {
                try {
                    this[a] = void 0, delete this[a]
                } catch (b) {
                }
            })
        }}), n.extend({propFix: {"for": "htmlFor","class": "className"},prop: function(a, b, c) {
            var d, e, f, g = a.nodeType;
            if (a && 3 !== g && 8 !== g && 2 !== g)
                return f = 1 !== g || !n.isXMLDoc(a), f && (b = n.propFix[b] || b, e = n.propHooks[b]), void 0 !== c ? e && "set" in e && void 0 !== (d = e.set(a, c, b)) ? d : a[b] = c : e && "get" in e && null !== (d = e.get(a, b)) ? d : a[b]
        },propHooks: {tabIndex: {get: function(a) {
                    var b = n.find.attr(a, "tabindex");
                    return b ? parseInt(b, 10) : tc.test(a.nodeName) || uc.test(a.nodeName) && a.href ? 0 : -1
                }}}}), l.hrefNormalized || n.each(["href", "src"], function(a, b) {
        n.propHooks[b] = {get: function(a) {
                return a.getAttribute(b, 4)
            }}
    }), l.optSelected || (n.propHooks.selected = {get: function(a) {
            var b = a.parentNode;
            return b && (b.selectedIndex, b.parentNode && b.parentNode.selectedIndex), null
        }}), n.each(["tabIndex", "readOnly", "maxLength", "cellSpacing", "cellPadding", "rowSpan", "colSpan", "useMap", "frameBorder", "contentEditable"], function() {
        n.propFix[this.toLowerCase()] = this
    }), l.enctype || (n.propFix.enctype = "encoding");
    var vc = /[\t\r\n\f]/g;
    n.fn.extend({addClass: function(a) {
            var b, c, d, e, f, g, h = 0, i = this.length, j = "string" == typeof a && a;
            if (n.isFunction(a))
                return this.each(function(b) {
                    n(this).addClass(a.call(this, b, this.className))
                });
            if (j)
                for (b = (a || "").match(F) || []; i > h; h++)
                    if (c = this[h], d = 1 === c.nodeType && (c.className ? (" " + c.className + " ").replace(vc, " ") : " ")) {
                        f = 0;
                        while (e = b[f++])
                            d.indexOf(" " + e + " ") < 0 && (d += e + " ");
                        g = n.trim(d), c.className !== g && (c.className = g)
                    }
            return this
        },removeClass: function(a) {
            var b, c, d, e, f, g, h = 0, i = this.length, j = 0 === arguments.length || "string" == typeof a && a;
            if (n.isFunction(a))
                return this.each(function(b) {
                    n(this).removeClass(a.call(this, b, this.className))
                });
            if (j)
                for (b = (a || "").match(F) || []; i > h; h++)
                    if (c = this[h], d = 1 === c.nodeType && (c.className ? (" " + c.className + " ").replace(vc, " ") : "")) {
                        f = 0;
                        while (e = b[f++])
                            while (d.indexOf(" " + e + " ") >= 0)
                                d = d.replace(" " + e + " ", " ");
                        g = a ? n.trim(d) : "", c.className !== g && (c.className = g)
                    }
            return this
        },toggleClass: function(a, b) {
            var c = typeof a;
            return "boolean" == typeof b && "string" === c ? b ? this.addClass(a) : this.removeClass(a) : this.each(n.isFunction(a) ? function(c) {
                n(this).toggleClass(a.call(this, c, this.className, b), b)
            } : function() {
                if ("string" === c) {
                    var b, d = 0, e = n(this), f = a.match(F) || [];
                    while (b = f[d++])
                        e.hasClass(b) ? e.removeClass(b) : e.addClass(b)
                } else
                    (c === L || "boolean" === c) && (this.className && n._data(this, "__className__", this.className), this.className = this.className || a === !1 ? "" : n._data(this, "__className__") || "")
            })
        },hasClass: function(a) {
            for (var b = " " + a + " ", c = 0, d = this.length; d > c; c++)
                if (1 === this[c].nodeType && (" " + this[c].className + " ").replace(vc, " ").indexOf(b) >= 0)
                    return !0;
            return !1
        }}), n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function(a, b) {
        n.fn[b] = function(a, c) {
            return arguments.length > 0 ? this.on(b, null, a, c) : this.trigger(b)
        }
    }), n.fn.extend({hover: function(a, b) {
            return this.mouseenter(a).mouseleave(b || a)
        },bind: function(a, b, c) {
            return this.on(a, null, b, c)
        },unbind: function(a, b) {
            return this.off(a, null, b)
        },delegate: function(a, b, c, d) {
            return this.on(b, a, c, d)
        },undelegate: function(a, b, c) {
            return 1 === arguments.length ? this.off(a, "**") : this.off(b, a || "**", c)
        }});
    var wc = n.now(), xc = /\?/, yc = /(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;
    n.parseJSON = function(b) {
        if (a.JSON && a.JSON.parse)
            return a.JSON.parse(b + "");
        var c, d = null, e = n.trim(b + "");
        return e && !n.trim(e.replace(yc, function(a, b, e, f) {
            return c && b && (d = 0), 0 === d ? a : (c = e || b, d += !f - !e, "")
        })) ? Function("return " + e)() : n.error("Invalid JSON: " + b)
    }, n.parseXML = function(b) {
        var c, d;
        if (!b || "string" != typeof b)
            return null;
        try {
            a.DOMParser ? (d = new DOMParser, c = d.parseFromString(b, "text/xml")) : (c = new ActiveXObject("Microsoft.XMLDOM"), c.async = "false", c.loadXML(b))
        } catch (e) {
            c = void 0
        }
        return c && c.documentElement && !c.getElementsByTagName("parsererror").length || n.error("Invalid XML: " + b), c
    };
    var zc, Ac, Bc = /#.*$/, Cc = /([?&])_=[^&]*/, Dc = /^(.*?):[ \t]*([^\r\n]*)\r?$/gm, Ec = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, Fc = /^(?:GET|HEAD)$/, Gc = /^\/\//, Hc = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/, Ic = {}, Jc = {}, Kc = "*/".concat("*");
    try {
        Ac = location.href
    } catch (Lc) {
        Ac = z.createElement("a"), Ac.href = "", Ac = Ac.href
    }
    zc = Hc.exec(Ac.toLowerCase()) || [];
    function Mc(a) {
        return function(b, c) {
            "string" != typeof b && (c = b, b = "*");
            var d, e = 0, f = b.toLowerCase().match(F) || [];
            if (n.isFunction(c))
                while (d = f[e++])
                    "+" === d.charAt(0) ? (d = d.slice(1) || "*", (a[d] = a[d] || []).unshift(c)) : (a[d] = a[d] || []).push(c)
        }
    }
    function Nc(a, b, c, d) {
        var e = {}, f = a === Jc;
        function g(h) {
            var i;
            return e[h] = !0, n.each(a[h] || [], function(a, h) {
                var j = h(b, c, d);
                return "string" != typeof j || f || e[j] ? f ? !(i = j) : void 0 : (b.dataTypes.unshift(j), g(j), !1)
            }), i
        }
        return g(b.dataTypes[0]) || !e["*"] && g("*")
    }
    function Oc(a, b) {
        var c, d, e = n.ajaxSettings.flatOptions || {};
        for (d in b)
            void 0 !== b[d] && ((e[d] ? a : c || (c = {}))[d] = b[d]);
        return c && n.extend(!0, a, c), a
    }
    function Pc(a, b, c) {
        var d, e, f, g, h = a.contents, i = a.dataTypes;
        while ("*" === i[0])
            i.shift(), void 0 === e && (e = a.mimeType || b.getResponseHeader("Content-Type"));
        if (e)
            for (g in h)
                if (h[g] && h[g].test(e)) {
                    i.unshift(g);
                    break
                }
        if (i[0] in c)
            f = i[0];
        else {
            for (g in c) {
                if (!i[0] || a.converters[g + " " + i[0]]) {
                    f = g;
                    break
                }
                d || (d = g)
            }
            f = f || d
        }
        return f ? (f !== i[0] && i.unshift(f), c[f]) : void 0
    }
    function Qc(a, b, c, d) {
        var e, f, g, h, i, j = {}, k = a.dataTypes.slice();
        if (k[1])
            for (g in a.converters)
                j[g.toLowerCase()] = a.converters[g];
        f = k.shift();
        while (f)
            if (a.responseFields[f] && (c[a.responseFields[f]] = b), !i && d && a.dataFilter && (b = a.dataFilter(b, a.dataType)), i = f, f = k.shift())
                if ("*" === f)
                    f = i;
                else if ("*" !== i && i !== f) {
                    if (g = j[i + " " + f] || j["* " + f], !g)
                        for (e in j)
                            if (h = e.split(" "), h[1] === f && (g = j[i + " " + h[0]] || j["* " + h[0]])) {
                                g === !0 ? g = j[e] : j[e] !== !0 && (f = h[0], k.unshift(h[1]));
                                break
                            }
                    if (g !== !0)
                        if (g && a["throws"])
                            b = g(b);
                        else
                            try {
                                b = g(b)
                            } catch (l) {
                                return {state: "parsererror",error: g ? l : "No conversion from " + i + " to " + f}
                            }
                }
        return {state: "success",data: b}
    }
    n.extend({active: 0,lastModified: {},etag: {},ajaxSettings: {url: Ac,type: "GET",isLocal: Ec.test(zc[1]),global: !0,processData: !0,async: !0,contentType: "application/x-www-form-urlencoded; charset=UTF-8",accepts: {"*": Kc,text: "text/plain",html: "text/html",xml: "application/xml, text/xml",json: "application/json, text/javascript"},contents: {xml: /xml/,html: /html/,json: /json/},responseFields: {xml: "responseXML",text: "responseText",json: "responseJSON"},converters: {"* text": String,"text html": !0,"text json": n.parseJSON,"text xml": n.parseXML},flatOptions: {url: !0,context: !0}},ajaxSetup: function(a, b) {
            return b ? Oc(Oc(a, n.ajaxSettings), b) : Oc(n.ajaxSettings, a)
        },ajaxPrefilter: Mc(Ic),ajaxTransport: Mc(Jc),ajax: function(a, b) {
            "object" == typeof a && (b = a, a = void 0), b = b || {};
            var c, d, e, f, g, h, i, j, k = n.ajaxSetup({}, b), l = k.context || k, m = k.context && (l.nodeType || l.jquery) ? n(l) : n.event, o = n.Deferred(), p = n.Callbacks("once memory"), q = k.statusCode || {}, r = {}, s = {}, t = 0, u = "canceled", v = {readyState: 0,getResponseHeader: function(a) {
                    var b;
                    if (2 === t) {
                        if (!j) {
                            j = {};
                            while (b = Dc.exec(f))
                                j[b[1].toLowerCase()] = b[2]
                        }
                        b = j[a.toLowerCase()]
                    }
                    return null == b ? null : b
                },getAllResponseHeaders: function() {
                    return 2 === t ? f : null
                },setRequestHeader: function(a, b) {
                    var c = a.toLowerCase();
                    return t || (a = s[c] = s[c] || a, r[a] = b), this
                },overrideMimeType: function(a) {
                    return t || (k.mimeType = a), this
                },statusCode: function(a) {
                    var b;
                    if (a)
                        if (2 > t)
                            for (b in a)
                                q[b] = [q[b], a[b]];
                        else
                            v.always(a[v.status]);
                    return this
                },abort: function(a) {
                    var b = a || u;
                    return i && i.abort(b), x(0, b), this
                }};
            if (o.promise(v).complete = p.add, v.success = v.done, v.error = v.fail, k.url = ((a || k.url || Ac) + "").replace(Bc, "").replace(Gc, zc[1] + "//"), k.type = b.method || b.type || k.method || k.type, k.dataTypes = n.trim(k.dataType || "*").toLowerCase().match(F) || [""], null == k.crossDomain && (c = Hc.exec(k.url.toLowerCase()), k.crossDomain = !(!c || c[1] === zc[1] && c[2] === zc[2] && (c[3] || ("http:" === c[1] ? "80" : "443")) === (zc[3] || ("http:" === zc[1] ? "80" : "443")))), k.data && k.processData && "string" != typeof k.data && (k.data = n.param(k.data, k.traditional)), Nc(Ic, k, b, v), 2 === t)
                return v;
            h = k.global, h && 0 === n.active++ && n.event.trigger("ajaxStart"), k.type = k.type.toUpperCase(), k.hasContent = !Fc.test(k.type), e = k.url, k.hasContent || (k.data && (e = k.url += (xc.test(e) ? "&" : "?") + k.data, delete k.data), k.cache === !1 && (k.url = Cc.test(e) ? e.replace(Cc, "$1_=" + wc++) : e + (xc.test(e) ? "&" : "?") + "_=" + wc++)), k.ifModified && (n.lastModified[e] && v.setRequestHeader("If-Modified-Since", n.lastModified[e]), n.etag[e] && v.setRequestHeader("If-None-Match", n.etag[e])), (k.data && k.hasContent && k.contentType !== !1 || b.contentType) && v.setRequestHeader("Content-Type", k.contentType), v.setRequestHeader("Accept", k.dataTypes[0] && k.accepts[k.dataTypes[0]] ? k.accepts[k.dataTypes[0]] + ("*" !== k.dataTypes[0] ? ", " + Kc + "; q=0.01" : "") : k.accepts["*"]);
            for (d in k.headers)
                v.setRequestHeader(d, k.headers[d]);
            if (k.beforeSend && (k.beforeSend.call(l, v, k) === !1 || 2 === t))
                return v.abort();
            u = "abort";
            for (d in {success: 1,error: 1,complete: 1})
                v[d](k[d]);
            if (i = Nc(Jc, k, b, v)) {
                v.readyState = 1, h && m.trigger("ajaxSend", [v, k]), k.async && k.timeout > 0 && (g = setTimeout(function() {
                    v.abort("timeout")
                }, k.timeout));
                try {
                    t = 1, i.send(r, x)
                } catch (w) {
                    if (!(2 > t))
                        throw w;
                    x(-1, w)
                }
            } else
                x(-1, "No Transport");
            function x(a, b, c, d) {
                var j, r, s, u, w, x = b;
                2 !== t && (t = 2, g && clearTimeout(g), i = void 0, f = d || "", v.readyState = a > 0 ? 4 : 0, j = a >= 200 && 300 > a || 304 === a, c && (u = Pc(k, v, c)), u = Qc(k, u, v, j), j ? (k.ifModified && (w = v.getResponseHeader("Last-Modified"), w && (n.lastModified[e] = w), w = v.getResponseHeader("etag"), w && (n.etag[e] = w)), 204 === a || "HEAD" === k.type ? x = "nocontent" : 304 === a ? x = "notmodified" : (x = u.state, r = u.data, s = u.error, j = !s)) : (s = x, (a || !x) && (x = "error", 0 > a && (a = 0))), v.status = a, v.statusText = (b || x) + "", j ? o.resolveWith(l, [r, x, v]) : o.rejectWith(l, [v, x, s]), v.statusCode(q), q = void 0, h && m.trigger(j ? "ajaxSuccess" : "ajaxError", [v, k, j ? r : s]), p.fireWith(l, [v, x]), h && (m.trigger("ajaxComplete", [v, k]), --n.active || n.event.trigger("ajaxStop")))
            }
            return v
        },getJSON: function(a, b, c) {
            return n.get(a, b, c, "json")
        },getScript: function(a, b) {
            return n.get(a, void 0, b, "script")
        }}), n.each(["get", "post"], function(a, b) {
        n[b] = function(a, c, d, e) {
            return n.isFunction(c) && (e = e || d, d = c, c = void 0), n.ajax({url: a,type: b,dataType: e,data: c,success: d})
        }
    }), n.each(["ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend"], function(a, b) {
        n.fn[b] = function(a) {
            return this.on(b, a)
        }
    }), n._evalUrl = function(a) {
        return n.ajax({url: a,type: "GET",dataType: "script",async: !1,global: !1,"throws": !0})
    }, n.fn.extend({wrapAll: function(a) {
            if (n.isFunction(a))
                return this.each(function(b) {
                    n(this).wrapAll(a.call(this, b))
                });
            if (this[0]) {
                var b = n(a, this[0].ownerDocument).eq(0).clone(!0);
                this[0].parentNode && b.insertBefore(this[0]), b.map(function() {
                    var a = this;
                    while (a.firstChild && 1 === a.firstChild.nodeType)
                        a = a.firstChild;
                    return a
                }).append(this)
            }
            return this
        },wrapInner: function(a) {
            return this.each(n.isFunction(a) ? function(b) {
                n(this).wrapInner(a.call(this, b))
            } : function() {
                var b = n(this), c = b.contents();
                c.length ? c.wrapAll(a) : b.append(a)
            })
        },wrap: function(a) {
            var b = n.isFunction(a);
            return this.each(function(c) {
                n(this).wrapAll(b ? a.call(this, c) : a)
            })
        },unwrap: function() {
            return this.parent().each(function() {
                n.nodeName(this, "body") || n(this).replaceWith(this.childNodes)
            }).end()
        }}), n.expr.filters.hidden = function(a) {
        return a.offsetWidth <= 0 && a.offsetHeight <= 0 || !l.reliableHiddenOffsets() && "none" === (a.style && a.style.display || n.css(a, "display"))
    }, n.expr.filters.visible = function(a) {
        return !n.expr.filters.hidden(a)
    };
    var Rc = /%20/g, Sc = /\[\]$/, Tc = /\r?\n/g, Uc = /^(?:submit|button|image|reset|file)$/i, Vc = /^(?:input|select|textarea|keygen)/i;
    function Wc(a, b, c, d) {
        var e;
        if (n.isArray(b))
            n.each(b, function(b, e) {
                c || Sc.test(a) ? d(a, e) : Wc(a + "[" + ("object" == typeof e ? b : "") + "]", e, c, d)
            });
        else if (c || "object" !== n.type(b))
            d(a, b);
        else
            for (e in b)
                Wc(a + "[" + e + "]", b[e], c, d)
    }
    n.param = function(a, b) {
        var c, d = [], e = function(a, b) {
            b = n.isFunction(b) ? b() : null == b ? "" : b, d[d.length] = encodeURIComponent(a) + "=" + encodeURIComponent(b)
        };
        if (void 0 === b && (b = n.ajaxSettings && n.ajaxSettings.traditional), n.isArray(a) || a.jquery && !n.isPlainObject(a))
            n.each(a, function() {
                e(this.name, this.value)
            });
        else
            for (c in a)
                Wc(c, a[c], b, e);
        return d.join("&").replace(Rc, "+")
    }, n.fn.extend({serialize: function() {
            return n.param(this.serializeArray())
        },serializeArray: function() {
            return this.map(function() {
                var a = n.prop(this, "elements");
                return a ? n.makeArray(a) : this
            }).filter(function() {
                var a = this.type;
                return this.name && !n(this).is(":disabled") && Vc.test(this.nodeName) && !Uc.test(a) && (this.checked || !X.test(a))
            }).map(function(a, b) {
                var c = n(this).val();
                return null == c ? null : n.isArray(c) ? n.map(c, function(a) {
                    return {name: b.name,value: a.replace(Tc, "\r\n")}
                }) : {name: b.name,value: c.replace(Tc, "\r\n")}
            }).get()
        }}), n.ajaxSettings.xhr = void 0 !== a.ActiveXObject ? function() {
        return !this.isLocal && /^(get|post|head|put|delete|options)$/i.test(this.type) && $c() || _c()
    } : $c;
    var Xc = 0, Yc = {}, Zc = n.ajaxSettings.xhr();
    a.ActiveXObject && n(a).on("unload", function() {
        for (var a in Yc)
            Yc[a](void 0, !0)
    }), l.cors = !!Zc && "withCredentials" in Zc, Zc = l.ajax = !!Zc, Zc && n.ajaxTransport(function(a) {
        if (!a.crossDomain || l.cors) {
            var b;
            return {send: function(c, d) {
                    var e, f = a.xhr(), g = ++Xc;
                    if (f.open(a.type, a.url, a.async, a.username, a.password), a.xhrFields)
                        for (e in a.xhrFields)
                            f[e] = a.xhrFields[e];
                    a.mimeType && f.overrideMimeType && f.overrideMimeType(a.mimeType), a.crossDomain || c["X-Requested-With"] || (c["X-Requested-With"] = "XMLHttpRequest");
                    for (e in c)
                        void 0 !== c[e] && f.setRequestHeader(e, c[e] + "");
                    f.send(a.hasContent && a.data || null), b = function(c, e) {
                        var h, i, j;
                        if (b && (e || 4 === f.readyState))
                            if (delete Yc[g], b = void 0, f.onreadystatechange = n.noop, e)
                                4 !== f.readyState && f.abort();
                            else {
                                j = {}, h = f.status, "string" == typeof f.responseText && (j.text = f.responseText);
                                try {
                                    i = f.statusText
                                } catch (k) {
                                    i = ""
                                }
                                h || !a.isLocal || a.crossDomain ? 1223 === h && (h = 204) : h = j.text ? 200 : 404
                            }
                        j && d(h, i, j, f.getAllResponseHeaders())
                    }, a.async ? 4 === f.readyState ? setTimeout(b) : f.onreadystatechange = Yc[g] = b : b()
                },abort: function() {
                    b && b(void 0, !0)
                }}
        }
    });
    function $c() {
        try {
            return new a.XMLHttpRequest
        } catch (b) {
        }
    }
    function _c() {
        try {
            return new a.ActiveXObject("Microsoft.XMLHTTP")
        } catch (b) {
        }
    }
    n.ajaxSetup({accepts: {script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents: {script: /(?:java|ecma)script/},converters: {"text script": function(a) {
                return n.globalEval(a), a
            }}}), n.ajaxPrefilter("script", function(a) {
        void 0 === a.cache && (a.cache = !1), a.crossDomain && (a.type = "GET", a.global = !1)
    }), n.ajaxTransport("script", function(a) {
        if (a.crossDomain) {
            var b, c = z.head || n("head")[0] || z.documentElement;
            return {send: function(d, e) {
                    b = z.createElement("script"), b.async = !0, a.scriptCharset && (b.charset = a.scriptCharset), b.src = a.url, b.onload = b.onreadystatechange = function(a, c) {
                        (c || !b.readyState || /loaded|complete/.test(b.readyState)) && (b.onload = b.onreadystatechange = null, b.parentNode && b.parentNode.removeChild(b), b = null, c || e(200, "success"))
                    }, c.insertBefore(b, c.firstChild)
                },abort: function() {
                    b && b.onload(void 0, !0)
                }}
        }
    });
    var ad = [], bd = /(=)\?(?=&|$)|\?\?/;
    n.ajaxSetup({jsonp: "callback",jsonpCallback: function() {
            var a = ad.pop() || n.expando + "_" + wc++;
            return this[a] = !0, a
        }}), n.ajaxPrefilter("json jsonp", function(b, c, d) {
        var e, f, g, h = b.jsonp !== !1 && (bd.test(b.url) ? "url" : "string" == typeof b.data && !(b.contentType || "").indexOf("application/x-www-form-urlencoded") && bd.test(b.data) && "data");
        return h || "jsonp" === b.dataTypes[0] ? (e = b.jsonpCallback = n.isFunction(b.jsonpCallback) ? b.jsonpCallback() : b.jsonpCallback, h ? b[h] = b[h].replace(bd, "$1" + e) : b.jsonp !== !1 && (b.url += (xc.test(b.url) ? "&" : "?") + b.jsonp + "=" + e), b.converters["script json"] = function() {
            return g || n.error(e + " was not called"), g[0]
        }, b.dataTypes[0] = "json", f = a[e], a[e] = function() {
            g = arguments
        }, d.always(function() {
            a[e] = f, b[e] && (b.jsonpCallback = c.jsonpCallback, ad.push(e)), g && n.isFunction(f) && f(g[0]), g = f = void 0
        }), "script") : void 0
    }), n.parseHTML = function(a, b, c) {
        if (!a || "string" != typeof a)
            return null;
        "boolean" == typeof b && (c = b, b = !1), b = b || z;
        var d = v.exec(a), e = !c && [];
        return d ? [b.createElement(d[1])] : (d = n.buildFragment([a], b, e), e && e.length && n(e).remove(), n.merge([], d.childNodes))
    };
    var cd = n.fn.load;
    n.fn.load = function(a, b, c) {
        if ("string" != typeof a && cd)
            return cd.apply(this, arguments);
        var d, e, f, g = this, h = a.indexOf(" ");
        return h >= 0 && (d = a.slice(h, a.length), a = a.slice(0, h)), n.isFunction(b) ? (c = b, b = void 0) : b && "object" == typeof b && (f = "POST"), g.length > 0 && n.ajax({url: a,type: f,dataType: "html",data: b}).done(function(a) {
            e = arguments, g.html(d ? n("<div>").append(n.parseHTML(a)).find(d) : a)
        }).complete(c && function(a, b) {
            g.each(c, e || [a.responseText, b, a])
        }), this
    }, n.expr.filters.animated = function(a) {
        return n.grep(n.timers, function(b) {
            return a === b.elem
        }).length
    };
    var dd = a.document.documentElement;
    function ed(a) {
        return n.isWindow(a) ? a : 9 === a.nodeType ? a.defaultView || a.parentWindow : !1
    }
    n.offset = {setOffset: function(a, b, c) {
            var d, e, f, g, h, i, j, k = n.css(a, "position"), l = n(a), m = {};
            "static" === k && (a.style.position = "relative"), h = l.offset(), f = n.css(a, "top"), i = n.css(a, "left"), j = ("absolute" === k || "fixed" === k) && n.inArray("auto", [f, i]) > -1, j ? (d = l.position(), g = d.top, e = d.left) : (g = parseFloat(f) || 0, e = parseFloat(i) || 0), n.isFunction(b) && (b = b.call(a, c, h)), null != b.top && (m.top = b.top - h.top + g), null != b.left && (m.left = b.left - h.left + e), "using" in b ? b.using.call(a, m) : l.css(m)
        }}, n.fn.extend({offset: function(a) {
            if (arguments.length)
                return void 0 === a ? this : this.each(function(b) {
                    n.offset.setOffset(this, a, b)
                });
            var b, c, d = {top: 0,left: 0}, e = this[0], f = e && e.ownerDocument;
            if (f)
                return b = f.documentElement, n.contains(b, e) ? (typeof e.getBoundingClientRect !== L && (d = e.getBoundingClientRect()), c = ed(f), {top: d.top + (c.pageYOffset || b.scrollTop) - (b.clientTop || 0),left: d.left + (c.pageXOffset || b.scrollLeft) - (b.clientLeft || 0)}) : d
        },position: function() {
            if (this[0]) {
                var a, b, c = {top: 0,left: 0}, d = this[0];
                return "fixed" === n.css(d, "position") ? b = d.getBoundingClientRect() : (a = this.offsetParent(), b = this.offset(), n.nodeName(a[0], "html") || (c = a.offset()), c.top += n.css(a[0], "borderTopWidth", !0), c.left += n.css(a[0], "borderLeftWidth", !0)), {top: b.top - c.top - n.css(d, "marginTop", !0),left: b.left - c.left - n.css(d, "marginLeft", !0)}
            }
        },offsetParent: function() {
            return this.map(function() {
                var a = this.offsetParent || dd;
                while (a && !n.nodeName(a, "html") && "static" === n.css(a, "position"))
                    a = a.offsetParent;
                return a || dd
            })
        }}), n.each({scrollLeft: "pageXOffset",scrollTop: "pageYOffset"}, function(a, b) {
        var c = /Y/.test(b);
        n.fn[a] = function(d) {
            return W(this, function(a, d, e) {
                var f = ed(a);
                return void 0 === e ? f ? b in f ? f[b] : f.document.documentElement[d] : a[d] : void (f ? f.scrollTo(c ? n(f).scrollLeft() : e, c ? e : n(f).scrollTop()) : a[d] = e)
            }, a, d, arguments.length, null)
        }
    }), n.each(["top", "left"], function(a, b) {
        n.cssHooks[b] = Mb(l.pixelPosition, function(a, c) {
            return c ? (c = Kb(a, b), Ib.test(c) ? n(a).position()[b] + "px" : c) : void 0
        })
    }), n.each({Height: "height",Width: "width"}, function(a, b) {
        n.each({padding: "inner" + a,content: b,"": "outer" + a}, function(c, d) {
            n.fn[d] = function(d, e) {
                var f = arguments.length && (c || "boolean" != typeof d), g = c || (d === !0 || e === !0 ? "margin" : "border");
                return W(this, function(b, c, d) {
                    var e;
                    return n.isWindow(b) ? b.document.documentElement["client" + a] : 9 === b.nodeType ? (e = b.documentElement, Math.max(b.body["scroll" + a], e["scroll" + a], b.body["offset" + a], e["offset" + a], e["client" + a])) : void 0 === d ? n.css(b, c, g) : n.style(b, c, d, g)
                }, b, f ? d : void 0, f, null)
            }
        })
    }), n.fn.size = function() {
        return this.length
    }, n.fn.andSelf = n.fn.addBack, "function" == typeof define && define.amd && define("jquery", [], function() {
        return n
    });
    var fd = a.jQuery, gd = a.$;
    return n.noConflict = function(b) {
        return a.$ === n && (a.$ = gd), b && a.jQuery === n && (a.jQuery = fd), n
    }, typeof b === L && (a.jQuery = a.$ = n), n
});

/**************************************************************************************



/common/js/lib/jquery/jquery-migrate-1.2.1.min.js



**************************************************************************************/
/*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */
jQuery.migrateMute === void 0 && (jQuery.migrateMute = !0), function(e, t, n) {
    function r(n) {
        var r = t.console;
        i[n] || (i[n] = !0, e.migrateWarnings.push(n), r && r.warn && !e.migrateMute && (r.warn("JQMIGRATE: " + n), e.migrateTrace && r.trace && r.trace()))
    }
    function a(t, a, i, o) {
        if (Object.defineProperty)
            try {
                return Object.defineProperty(t, a, {configurable: !0,enumerable: !0,get: function() {
                        return r(o), i
                    },set: function(e) {
                        r(o), i = e
                    }}), n
            } catch (s) {
            }
        e._definePropertyBroken = !0, t[a] = i
    }
    var i = {};
    e.migrateWarnings = [], !e.migrateMute && t.console && t.console.log && t.console.log("JQMIGRATE: Logging is active"), e.migrateTrace === n && (e.migrateTrace = !0), e.migrateReset = function() {
        i = {}, e.migrateWarnings.length = 0
    }, "BackCompat" === document.compatMode && r("jQuery is not compatible with Quirks Mode");
    var o = e("<input/>", {size: 1}).attr("size") && e.attrFn, s = e.attr, u = e.attrHooks.value && e.attrHooks.value.get || function() {
        return null
    }, c = e.attrHooks.value && e.attrHooks.value.set || function() {
        return n
    }, l = /^(?:input|button)$/i, d = /^[238]$/, p = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, f = /^(?:checked|selected)$/i;
    a(e, "attrFn", o || {}, "jQuery.attrFn is deprecated"), e.attr = function(t, a, i, u) {
        var c = a.toLowerCase(), g = t && t.nodeType;
        return u && (4 > s.length && r("jQuery.fn.attr( props, pass ) is deprecated"), t && !d.test(g) && (o ? a in o : e.isFunction(e.fn[a]))) ? e(t)[a](i) : ("type" === a && i !== n && l.test(t.nodeName) && t.parentNode && r("Can't change the 'type' of an input or button in IE 6/7/8"), !e.attrHooks[c] && p.test(c) && (e.attrHooks[c] = {get: function(t, r) {
                var a, i = e.prop(t, r);
                return i === !0 || "boolean" != typeof i && (a = t.getAttributeNode(r)) && a.nodeValue !== !1 ? r.toLowerCase() : n
            },set: function(t, n, r) {
                var a;
                return n === !1 ? e.removeAttr(t, r) : (a = e.propFix[r] || r, a in t && (t[a] = !0), t.setAttribute(r, r.toLowerCase())), r
            }}, f.test(c) && r("jQuery.fn.attr('" + c + "') may use property instead of attribute")), s.call(e, t, a, i))
    }, e.attrHooks.value = {get: function(e, t) {
            var n = (e.nodeName || "").toLowerCase();
            return "button" === n ? u.apply(this, arguments) : ("input" !== n && "option" !== n && r("jQuery.fn.attr('value') no longer gets properties"), t in e ? e.value : null)
        },set: function(e, t) {
            var a = (e.nodeName || "").toLowerCase();
            return "button" === a ? c.apply(this, arguments) : ("input" !== a && "option" !== a && r("jQuery.fn.attr('value', val) no longer sets properties"), e.value = t, n)
        }};
    var g, h, v = e.fn.init, m = e.parseJSON, y = /^([^<]*)(<[\w\W]+>)([^>]*)$/;
    e.fn.init = function(t, n, a) {
        var i;
        return t && "string" == typeof t && !e.isPlainObject(n) && (i = y.exec(e.trim(t))) && i[0] && ("<" !== t.charAt(0) && r("$(html) HTML strings must start with '<' character"), i[3] && r("$(html) HTML text after last tag is ignored"), "#" === i[0].charAt(0) && (r("HTML string cannot start with a '#' character"), e.error("JQMIGRATE: Invalid selector string (XSS)")), n && n.context && (n = n.context), e.parseHTML) ? v.call(this, e.parseHTML(i[2], n, !0), n, a) : v.apply(this, arguments)
    }, e.fn.init.prototype = e.fn, e.parseJSON = function(e) {
        return e || null === e ? m.apply(this, arguments) : (r("jQuery.parseJSON requires a valid JSON string"), null)
    }, e.uaMatch = function(e) {
        e = e.toLowerCase();
        var t = /(chrome)[ \/]([\w.]+)/.exec(e) || /(webkit)[ \/]([\w.]+)/.exec(e) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e) || /(msie) ([\w.]+)/.exec(e) || 0 > e.indexOf("compatible") && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e) || [];
        return {browser: t[1] || "",version: t[2] || "0"}
    }, e.browser || (g = e.uaMatch(navigator.userAgent), h = {}, g.browser && (h[g.browser] = !0, h.version = g.version), h.chrome ? h.webkit = !0 : h.webkit && (h.safari = !0), e.browser = h), a(e, "browser", e.browser, "jQuery.browser is deprecated"), e.sub = function() {
        function t(e, n) {
            return new t.fn.init(e, n)
        }
        e.extend(!0, t, this), t.superclass = this, t.fn = t.prototype = this(), t.fn.constructor = t, t.sub = this.sub, t.fn.init = function(r, a) {
            return a && a instanceof e && !(a instanceof t) && (a = t(a)), e.fn.init.call(this, r, a, n)
        }, t.fn.init.prototype = t.fn;
        var n = t(document);
        return r("jQuery.sub() is deprecated"), t
    }, e.ajaxSetup({converters: {"text json": e.parseJSON}});
    var b = e.fn.data;
    e.fn.data = function(t) {
        var a, i, o = this[0];
        return !o || "events" !== t || 1 !== arguments.length || (a = e.data(o, t), i = e._data(o, t), a !== n && a !== i || i === n) ? b.apply(this, arguments) : (r("Use of jQuery.fn.data('events') is deprecated"), i)
    };
    var j = /\/(java|ecma)script/i, w = e.fn.andSelf || e.fn.addBack;
    e.fn.andSelf = function() {
        return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"), w.apply(this, arguments)
    }, e.clean || (e.clean = function(t, a, i, o) {
        a = a || document, a = !a.nodeType && a[0] || a, a = a.ownerDocument || a, r("jQuery.clean() is deprecated");
        var s, u, c, l, d = [];
        if (e.merge(d, e.buildFragment(t, a).childNodes), i)
            for (c = function(e) {
                return !e.type || j.test(e.type) ? o ? o.push(e.parentNode ? e.parentNode.removeChild(e) : e) : i.appendChild(e) : n
            }, s = 0; null != (u = d[s]); s++)
                e.nodeName(u, "script") && c(u) || (i.appendChild(u), u.getElementsByTagName !== n && (l = e.grep(e.merge([], u.getElementsByTagName("script")), c), d.splice.apply(d, [s + 1, 0].concat(l)), s += l.length));
        return d
    });
    var Q = e.event.add, x = e.event.remove, k = e.event.trigger, N = e.fn.toggle, T = e.fn.live, M = e.fn.die, S = "ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess", C = RegExp("\\b(?:" + S + ")\\b"), H = /(?:^|\s)hover(\.\S+|)\b/, A = function(t) {
        return "string" != typeof t || e.event.special.hover ? t : (H.test(t) && r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"), t && t.replace(H, "mouseenter$1 mouseleave$1"))
    };
    e.event.props && "attrChange" !== e.event.props[0] && e.event.props.unshift("attrChange", "attrName", "relatedNode", "srcElement"), e.event.dispatch && a(e.event, "handle", e.event.dispatch, "jQuery.event.handle is undocumented and deprecated"), e.event.add = function(e, t, n, a, i) {
        e !== document && C.test(t) && r("AJAX events should be attached to document: " + t), Q.call(this, e, A(t || ""), n, a, i)
    }, e.event.remove = function(e, t, n, r, a) {
        x.call(this, e, A(t) || "", n, r, a)
    }, e.fn.error = function() {
        var e = Array.prototype.slice.call(arguments, 0);
        return r("jQuery.fn.error() is deprecated"), e.splice(0, 0, "error"), arguments.length ? this.bind.apply(this, e) : (this.triggerHandler.apply(this, e), this)
    }, e.fn.toggle = function(t, n) {
        if (!e.isFunction(t) || !e.isFunction(n))
            return N.apply(this, arguments);
        r("jQuery.fn.toggle(handler, handler...) is deprecated");
        var a = arguments, i = t.guid || e.guid++, o = 0, s = function(n) {
            var r = (e._data(this, "lastToggle" + t.guid) || 0) % o;
            return e._data(this, "lastToggle" + t.guid, r + 1), n.preventDefault(), a[r].apply(this, arguments) || !1
        };
        for (s.guid = i; a.length > o; )
            a[o++].guid = i;
        return this.click(s)
    }, e.fn.live = function(t, n, a) {
        return r("jQuery.fn.live() is deprecated"), T ? T.apply(this, arguments) : (e(this.context).on(t, this.selector, n, a), this)
    }, e.fn.die = function(t, n) {
        return r("jQuery.fn.die() is deprecated"), M ? M.apply(this, arguments) : (e(this.context).off(t, this.selector || "**", n), this)
    }, e.event.trigger = function(e, t, n, a) {
        return n || C.test(e) || r("Global events are undocumented and deprecated"), k.call(this, e, t, n || document, a)
    }, e.each(S.split("|"), function(t, n) {
        e.event.special[n] = {setup: function() {
                var t = this;
                return t !== document && (e.event.add(document, n + "." + e.guid, function() {
                    e.event.trigger(n, null, t, !0)
                }), e._data(this, n, e.guid++)), !1
            },teardown: function() {
                return this !== document && e.event.remove(document, n + "." + e._data(this, n)), !1
            }}
    })
}(jQuery, window);

/**************************************************************************************



/common/js/lib/jquery/jquery-ui.custom.min.js



**************************************************************************************/
/*! jQuery UI - v1.9.2 - 2012-12-04
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.resizable.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.dialog.js, jquery.ui.menu.js
* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */

(function(e, t) {
    function i(t, n) {
        var r, i, o, u = t.nodeName.toLowerCase();
        return "area" === u ? (r = t.parentNode, i = r.name, !t.href || !i || r.nodeName.toLowerCase() !== "map" ? !1 : (o = e("img[usemap=#" + i + "]")[0], !!o && s(o))) : (/input|select|textarea|button|object/.test(u) ? !t.disabled : "a" === u ? t.href || n : n) && s(t)
    }
    function s(t) {
        return e.expr.filters.visible(t) && !e(t).parents().andSelf().filter(function() {
            return e.css(this, "visibility") === "hidden"
        }).length
    }
    var n = 0, r = /^ui-id-\d+$/;
    e.ui = e.ui || {};
    if (e.ui.version)
        return;
    e.extend(e.ui, {version: "1.9.2",keyCode: {BACKSPACE: 8,COMMA: 188,DELETE: 46,DOWN: 40,END: 35,ENTER: 13,ESCAPE: 27,HOME: 36,LEFT: 37,NUMPAD_ADD: 107,NUMPAD_DECIMAL: 110,NUMPAD_DIVIDE: 111,NUMPAD_ENTER: 108,NUMPAD_MULTIPLY: 106,NUMPAD_SUBTRACT: 109,PAGE_DOWN: 34,PAGE_UP: 33,PERIOD: 190,RIGHT: 39,SPACE: 32,TAB: 9,UP: 38}}), e.fn.extend({_focus: e.fn.focus,focus: function(t, n) {
            return typeof t == "number" ? this.each(function() {
                var r = this;
                setTimeout(function() {
                    e(r).focus(), n && n.call(r)
                }, t)
            }) : this._focus.apply(this, arguments)
        },scrollParent: function() {
            var t;
            return e.ui.ie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position")) ? t = this.parents().filter(function() {
                return /(relative|absolute|fixed)/.test(e.css(this, "position")) && /(auto|scroll)/.test(e.css(this, "overflow") + e.css(this, "overflow-y") + e.css(this, "overflow-x"))
            }).eq(0) : t = this.parents().filter(function() {
                return /(auto|scroll)/.test(e.css(this, "overflow") + e.css(this, "overflow-y") + e.css(this, "overflow-x"))
            }).eq(0), /fixed/.test(this.css("position")) || !t.length ? e(document) : t
        },zIndex: function(n) {
            if (n !== t)
                return this.css("zIndex", n);
            if (this.length) {
                var r = e(this[0]), i, s;
                while (r.length && r[0] !== document) {
                    i = r.css("position");
                    if (i === "absolute" || i === "relative" || i === "fixed") {
                        s = parseInt(r.css("zIndex"), 10);
                        if (!isNaN(s) && s !== 0)
                            return s
                    }
                    r = r.parent()
                }
            }
            return 0
        },uniqueId: function() {
            return this.each(function() {
                this.id || (this.id = "ui-id-" + ++n)
            })
        },removeUniqueId: function() {
            return this.each(function() {
                r.test(this.id) && e(this).removeAttr("id")
            })
        }}), e.extend(e.expr[":"], {data: e.expr.createPseudo ? e.expr.createPseudo(function(t) {
            return function(n) {
                return !!e.data(n, t)
            }
        }) : function(t, n, r) {
            return !!e.data(t, r[3])
        },focusable: function(t) {
            return i(t, !isNaN(e.attr(t, "tabindex")))
        },tabbable: function(t) {
            var n = e.attr(t, "tabindex"), r = isNaN(n);
            return (r || n >= 0) && i(t, !r)
        }}), e(function() {
        var t = document.body, n = t.appendChild(n = document.createElement("div"));
        n.offsetHeight, e.extend(n.style, {minHeight: "100px",height: "auto",padding: 0,borderWidth: 0}), e.support.minHeight = n.offsetHeight === 100, e.support.selectstart = "onselectstart" in n, t.removeChild(n).style.display = "none"
    }), e("<a>").outerWidth(1).jquery || e.each(["Width", "Height"], function(n, r) {
        function u(t, n, r, s) {
            return e.each(i, function() {
                n -= parseFloat(e.css(t, "padding" + this)) || 0, r && (n -= parseFloat(e.css(t, "border" + this + "Width")) || 0), s && (n -= parseFloat(e.css(t, "margin" + this)) || 0)
            }), n
        }
        var i = r === "Width" ? ["Left", "Right"] : ["Top", "Bottom"], s = r.toLowerCase(), o = {innerWidth: e.fn.innerWidth,innerHeight: e.fn.innerHeight,outerWidth: e.fn.outerWidth,outerHeight: e.fn.outerHeight};
        e.fn["inner" + r] = function(n) {
            return n === t ? o["inner" + r].call(this) : this.each(function() {
                e(this).css(s, u(this, n) + "px")
            })
        }, e.fn["outer" + r] = function(t, n) {
            return typeof t != "number" ? o["outer" + r].call(this, t) : this.each(function() {
                e(this).css(s, u(this, t, !0, n) + "px")
            })
        }
    }), e("<a>").data("a-b", "a").removeData("a-b").data("a-b") && (e.fn.removeData = function(t) {
        return function(n) {
            return arguments.length ? t.call(this, e.camelCase(n)) : t.call(this)
        }
    }(e.fn.removeData)), function() {
        var t = /msie ([\w.]+)/.exec(navigator.userAgent.toLowerCase()) || [];
        e.ui.ie = t.length ? !0 : !1, e.ui.ie6 = parseFloat(t[1], 10) === 6
    }(), e.fn.extend({disableSelection: function() {
            return this.bind((e.support.selectstart ? "selectstart" : "mousedown") + ".ui-disableSelection", function(e) {
                e.preventDefault()
            })
        },enableSelection: function() {
            return this.unbind(".ui-disableSelection")
        }}), e.extend(e.ui, {plugin: {add: function(t, n, r) {
                var i, s = e.ui[t].prototype;
                for (i in r)
                    s.plugins[i] = s.plugins[i] || [], s.plugins[i].push([n, r[i]])
            },call: function(e, t, n) {
                var r, i = e.plugins[t];
                if (!i || !e.element[0].parentNode || e.element[0].parentNode.nodeType === 11)
                    return;
                for (r = 0; r < i.length; r++)
                    e.options[i[r][0]] && i[r][1].apply(e.element, n)
            }},contains: e.contains,hasScroll: function(t, n) {
            if (e(t).css("overflow") === "hidden")
                return !1;
            var r = n && n === "left" ? "scrollLeft" : "scrollTop", i = !1;
            return t[r] > 0 ? !0 : (t[r] = 1, i = t[r] > 0, t[r] = 0, i)
        },isOverAxis: function(e, t, n) {
            return e > t && e < t + n
        },isOver: function(t, n, r, i, s, o) {
            return e.ui.isOverAxis(t, r, s) && e.ui.isOverAxis(n, i, o)
        }})
})(jQuery);
(function(e, t) {
    var n = 0, r = Array.prototype.slice, i = e.cleanData;
    e.cleanData = function(t) {
        for (var n = 0, r; (r = t[n]) != null; n++)
            try {
                e(r).triggerHandler("remove")
            } catch (s) {
            }
        i(t)
    }, e.widget = function(t, n, r) {
        var i, s, o, u, a = t.split(".")[0];
        t = t.split(".")[1], i = a + "-" + t, r || (r = n, n = e.Widget), e.expr[":"][i.toLowerCase()] = function(t) {
            return !!e.data(t, i)
        }, e[a] = e[a] || {}, s = e[a][t], o = e[a][t] = function(e, t) {
            if (!this._createWidget)
                return new o(e, t);
            arguments.length && this._createWidget(e, t)
        }, e.extend(o, s, {version: r.version,_proto: e.extend({}, r),_childConstructors: []}), u = new n, u.options = e.widget.extend({}, u.options), e.each(r, function(t, i) {
            e.isFunction(i) && (r[t] = function() {
                var e = function() {
                    return n.prototype[t].apply(this, arguments)
                }, r = function(e) {
                    return n.prototype[t].apply(this, e)
                };
                return function() {
                    var t = this._super, n = this._superApply, s;
                    return this._super = e, this._superApply = r, s = i.apply(this, arguments), this._super = t, this._superApply = n, s
                }
            }())
        }), o.prototype = e.widget.extend(u, {widgetEventPrefix: s ? u.widgetEventPrefix : t}, r, {constructor: o,namespace: a,widgetName: t,widgetBaseClass: i,widgetFullName: i}), s ? (e.each(s._childConstructors, function(t, n) {
            var r = n.prototype;
            e.widget(r.namespace + "." + r.widgetName, o, n._proto)
        }), delete s._childConstructors) : n._childConstructors.push(o), e.widget.bridge(t, o)
    }, e.widget.extend = function(n) {
        var i = r.call(arguments, 1), s = 0, o = i.length, u, a;
        for (; s < o; s++)
            for (u in i[s])
                a = i[s][u], i[s].hasOwnProperty(u) && a !== t && (e.isPlainObject(a) ? n[u] = e.isPlainObject(n[u]) ? e.widget.extend({}, n[u], a) : e.widget.extend({}, a) : n[u] = a);
        return n
    }, e.widget.bridge = function(n, i) {
        var s = i.prototype.widgetFullName || n;
        e.fn[n] = function(o) {
            var u = typeof o == "string", a = r.call(arguments, 1), f = this;
            return o = !u && a.length ? e.widget.extend.apply(null, [o].concat(a)) : o, u ? this.each(function() {
                var r, i = e.data(this, s);
                if (!i)
                    return e.error("cannot call methods on " + n + " prior to initialization; " + "attempted to call method '" + o + "'");
                if (!e.isFunction(i[o]) || o.charAt(0) === "_")
                    return e.error("no such method '" + o + "' for " + n + " widget instance");
                r = i[o].apply(i, a);
                if (r !== i && r !== t)
                    return f = r && r.jquery ? f.pushStack(r.get()) : r, !1
            }) : this.each(function() {
                var t = e.data(this, s);
                t ? t.option(o || {})._init() : e.data(this, s, new i(o, this))
            }), f
        }
    }, e.Widget = function() {
    }, e.Widget._childConstructors = [], e.Widget.prototype = {widgetName: "widget",widgetEventPrefix: "",defaultElement: "<div>",options: {disabled: !1,create: null},_createWidget: function(t, r) {
            r = e(r || this.defaultElement || this)[0], this.element = e(r), this.uuid = n++, this.eventNamespace = "." + this.widgetName + this.uuid, this.options = e.widget.extend({}, this.options, this._getCreateOptions(), t), this.bindings = e(), this.hoverable = e(), this.focusable = e(), r !== this && (e.data(r, this.widgetName, this), e.data(r, this.widgetFullName, this), this._on(!0, this.element, {remove: function(e) {
                    e.target === r && this.destroy()
                }}), this.document = e(r.style ? r.ownerDocument : r.document || r), this.window = e(this.document[0].defaultView || this.document[0].parentWindow)), this._create(), this._trigger("create", null, this._getCreateEventData()), this._init()
        },_getCreateOptions: e.noop,_getCreateEventData: e.noop,_create: e.noop,_init: e.noop,destroy: function() {
            this._destroy(), this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)), this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName + "-disabled " + "ui-state-disabled"), this.bindings.unbind(this.eventNamespace), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")
        },_destroy: e.noop,widget: function() {
            return this.element
        },option: function(n, r) {
            var i = n, s, o, u;
            if (arguments.length === 0)
                return e.widget.extend({}, this.options);
            if (typeof n == "string") {
                i = {}, s = n.split("."), n = s.shift();
                if (s.length) {
                    o = i[n] = e.widget.extend({}, this.options[n]);
                    for (u = 0; u < s.length - 1; u++)
                        o[s[u]] = o[s[u]] || {}, o = o[s[u]];
                    n = s.pop();
                    if (r === t)
                        return o[n] === t ? null : o[n];
                    o[n] = r
                } else {
                    if (r === t)
                        return this.options[n] === t ? null : this.options[n];
                    i[n] = r
                }
            }
            return this._setOptions(i), this
        },_setOptions: function(e) {
            var t;
            for (t in e)
                this._setOption(t, e[t]);
            return this
        },_setOption: function(e, t) {
            return this.options[e] = t, e === "disabled" && (this.widget().toggleClass(this.widgetFullName + "-disabled ui-state-disabled", !!t).attr("aria-disabled", t), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")), this
        },enable: function() {
            return this._setOption("disabled", !1)
        },disable: function() {
            return this._setOption("disabled", !0)
        },_on: function(t, n, r) {
            var i, s = this;
            typeof t != "boolean" && (r = n, n = t, t = !1), r ? (n = i = e(n), this.bindings = this.bindings.add(n)) : (r = n, n = this.element, i = this.widget()), e.each(r, function(r, o) {
                function u() {
                    if (!t && (s.options.disabled === !0 || e(this).hasClass("ui-state-disabled")))
                        return;
                    return (typeof o == "string" ? s[o] : o).apply(s, arguments)
                }
                typeof o != "string" && (u.guid = o.guid = o.guid || u.guid || e.guid++);
                var a = r.match(/^(\w+)\s*(.*)$/), f = a[1] + s.eventNamespace, l = a[2];
                l ? i.delegate(l, f, u) : n.bind(f, u)
            })
        },_off: function(e, t) {
            t = (t || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, e.unbind(t).undelegate(t)
        },_delay: function(e, t) {
            function n() {
                return (typeof e == "string" ? r[e] : e).apply(r, arguments)
            }
            var r = this;
            return setTimeout(n, t || 0)
        },_hoverable: function(t) {
            this.hoverable = this.hoverable.add(t), this._on(t, {mouseenter: function(t) {
                    e(t.currentTarget).addClass("ui-state-hover")
                },mouseleave: function(t) {
                    e(t.currentTarget).removeClass("ui-state-hover")
                }})
        },_focusable: function(t) {
            this.focusable = this.focusable.add(t), this._on(t, {focusin: function(t) {
                    e(t.currentTarget).addClass("ui-state-focus")
                },focusout: function(t) {
                    e(t.currentTarget).removeClass("ui-state-focus")
                }})
        },_trigger: function(t, n, r) {
            var i, s, o = this.options[t];
            r = r || {}, n = e.Event(n), n.type = (t === this.widgetEventPrefix ? t : this.widgetEventPrefix + t).toLowerCase(), n.target = this.element[0], s = n.originalEvent;
            if (s)
                for (i in s)
                    i in n || (n[i] = s[i]);
            return this.element.trigger(n, r), !(e.isFunction(o) && o.apply(this.element[0], [n].concat(r)) === !1 || n.isDefaultPrevented())
        }}, e.each({show: "fadeIn",hide: "fadeOut"}, function(t, n) {
        e.Widget.prototype["_" + t] = function(r, i, s) {
            typeof i == "string" && (i = {effect: i});
            var o, u = i ? i === !0 || typeof i == "number" ? n : i.effect || n : t;
            i = i || {}, typeof i == "number" && (i = {duration: i}), o = !e.isEmptyObject(i), i.complete = s, i.delay && r.delay(i.delay), o && e.effects && (e.effects.effect[u] || e.uiBackCompat !== !1 && e.effects[u]) ? r[t](i) : u !== t && r[u] ? r[u](i.duration, i.easing, s) : r.queue(function(n) {
                e(this)[t](), s && s.call(r[0]), n()
            })
        }
    }), e.uiBackCompat !== !1 && (e.Widget.prototype._getCreateOptions = function() {
        return e.metadata && e.metadata.get(this.element[0])[this.widgetName]
    })
})(jQuery);
(function(e, t) {
    var n = !1;
    e(document).mouseup(function(e) {
        n = !1
    }), e.widget("ui.mouse", {version: "1.9.2",options: {cancel: "input,textarea,button,select,option",distance: 1,delay: 0},_mouseInit: function() {
            var t = this;
            this.element.bind("mousedown." + this.widgetName, function(e) {
                return t._mouseDown(e)
            }).bind("click." + this.widgetName, function(n) {
                if (!0 === e.data(n.target, t.widgetName + ".preventClickEvent"))
                    return e.removeData(n.target, t.widgetName + ".preventClickEvent"), n.stopImmediatePropagation(), !1
            }), this.started = !1
        },_mouseDestroy: function() {
            this.element.unbind("." + this.widgetName), this._mouseMoveDelegate && e(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate)
        },_mouseDown: function(t) {
            if (n)
                return;
            this._mouseStarted && this._mouseUp(t), this._mouseDownEvent = t;
            var r = this, i = t.which === 1, s = typeof this.options.cancel == "string" && t.target.nodeName ? e(t.target).closest(this.options.cancel).length : !1;
            if (!i || s || !this._mouseCapture(t))
                return !0;
            this.mouseDelayMet = !this.options.delay, this.mouseDelayMet || (this._mouseDelayTimer = setTimeout(function() {
                r.mouseDelayMet = !0
            }, this.options.delay));
            if (this._mouseDistanceMet(t) && this._mouseDelayMet(t)) {
                this._mouseStarted = this._mouseStart(t) !== !1;
                if (!this._mouseStarted)
                    return t.preventDefault(), !0
            }
            return !0 === e.data(t.target, this.widgetName + ".preventClickEvent") && e.removeData(t.target, this.widgetName + ".preventClickEvent"), this._mouseMoveDelegate = function(e) {
                return r._mouseMove(e)
            }, this._mouseUpDelegate = function(e) {
                return r._mouseUp(e)
            }, e(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate), t.preventDefault(), n = !0, !0
        },_mouseMove: function(t) {
            return !e.ui.ie || document.documentMode >= 9 || !!t.button ? this._mouseStarted ? (this._mouseDrag(t), t.preventDefault()) : (this._mouseDistanceMet(t) && this._mouseDelayMet(t) && (this._mouseStarted = this._mouseStart(this._mouseDownEvent, t) !== !1, this._mouseStarted ? this._mouseDrag(t) : this._mouseUp(t)), !this._mouseStarted) : this._mouseUp(t)
        },_mouseUp: function(t) {
            return e(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate), this._mouseStarted && (this._mouseStarted = !1, t.target === this._mouseDownEvent.target && e.data(t.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(t)), !1
        },_mouseDistanceMet: function(e) {
            return Math.max(Math.abs(this._mouseDownEvent.pageX - e.pageX), Math.abs(this._mouseDownEvent.pageY - e.pageY)) >= this.options.distance
        },_mouseDelayMet: function(e) {
            return this.mouseDelayMet
        },_mouseStart: function(e) {
        },_mouseDrag: function(e) {
        },_mouseStop: function(e) {
        },_mouseCapture: function(e) {
            return !0
        }})
})(jQuery);
(function(e, t) {
    function h(e, t, n) {
        return [parseInt(e[0], 10) * (l.test(e[0]) ? t / 100 : 1), parseInt(e[1], 10) * (l.test(e[1]) ? n / 100 : 1)]
    }
    function p(t, n) {
        return parseInt(e.css(t, n), 10) || 0
    }
    e.ui = e.ui || {};
    var n, r = Math.max, i = Math.abs, s = Math.round, o = /left|center|right/, u = /top|center|bottom/, a = /[\+\-]\d+%?/, f = /^\w+/, l = /%$/, c = e.fn.position;
    e.position = {scrollbarWidth: function() {
            if (n !== t)
                return n;
            var r, i, s = e("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"), o = s.children()[0];
            return e("body").append(s), r = o.offsetWidth, s.css("overflow", "scroll"), i = o.offsetWidth, r === i && (i = s[0].clientWidth), s.remove(), n = r - i
        },getScrollInfo: function(t) {
            var n = t.isWindow ? "" : t.element.css("overflow-x"), r = t.isWindow ? "" : t.element.css("overflow-y"), i = n === "scroll" || n === "auto" && t.width < t.element[0].scrollWidth, s = r === "scroll" || r === "auto" && t.height < t.element[0].scrollHeight;
            return {width: i ? e.position.scrollbarWidth() : 0,height: s ? e.position.scrollbarWidth() : 0}
        },getWithinInfo: function(t) {
            var n = e(t || window), r = e.isWindow(n[0]);
            return {element: n,isWindow: r,offset: n.offset() || {left: 0,top: 0},scrollLeft: n.scrollLeft(),scrollTop: n.scrollTop(),width: r ? n.width() : n.outerWidth(),height: r ? n.height() : n.outerHeight()}
        }}, e.fn.position = function(t) {
        if (!t || !t.of)
            return c.apply(this, arguments);
        t = e.extend({}, t);
        var n, l, d, v, m, g = e(t.of), y = e.position.getWithinInfo(t.within), b = e.position.getScrollInfo(y), w = g[0], E = (t.collision || "flip").split(" "), S = {};
        return w.nodeType === 9 ? (l = g.width(), d = g.height(), v = {top: 0,left: 0}) : e.isWindow(w) ? (l = g.width(), d = g.height(), v = {top: g.scrollTop(),left: g.scrollLeft()}) : w.preventDefault ? (t.at = "left top", l = d = 0, v = {top: w.pageY,left: w.pageX}) : (l = g.outerWidth(), d = g.outerHeight(), v = g.offset()), m = e.extend({}, v), e.each(["my", "at"], function() {
            var e = (t[this] || "").split(" "), n, r;
            e.length === 1 && (e = o.test(e[0]) ? e.concat(["center"]) : u.test(e[0]) ? ["center"].concat(e) : ["center", "center"]), e[0] = o.test(e[0]) ? e[0] : "center", e[1] = u.test(e[1]) ? e[1] : "center", n = a.exec(e[0]), r = a.exec(e[1]), S[this] = [n ? n[0] : 0, r ? r[0] : 0], t[this] = [f.exec(e[0])[0], f.exec(e[1])[0]]
        }), E.length === 1 && (E[1] = E[0]), t.at[0] === "right" ? m.left += l : t.at[0] === "center" && (m.left += l / 2), t.at[1] === "bottom" ? m.top += d : t.at[1] === "center" && (m.top += d / 2), n = h(S.at, l, d), m.left += n[0], m.top += n[1], this.each(function() {
            var o, u, a = e(this), f = a.outerWidth(), c = a.outerHeight(), w = p(this, "marginLeft"), x = p(this, "marginTop"), T = f + w + p(this, "marginRight") + b.width, N = c + x + p(this, "marginBottom") + b.height, C = e.extend({}, m), k = h(S.my, a.outerWidth(), a.outerHeight());
            t.my[0] === "right" ? C.left -= f : t.my[0] === "center" && (C.left -= f / 2), t.my[1] === "bottom" ? C.top -= c : t.my[1] === "center" && (C.top -= c / 2), C.left += k[0], C.top += k[1], e.support.offsetFractions || (C.left = s(C.left), C.top = s(C.top)), o = {marginLeft: w,marginTop: x}, e.each(["left", "top"], function(r, i) {
                e.ui.position[E[r]] && e.ui.position[E[r]][i](C, {targetWidth: l,targetHeight: d,elemWidth: f,elemHeight: c,collisionPosition: o,collisionWidth: T,collisionHeight: N,offset: [n[0] + k[0], n[1] + k[1]],my: t.my,at: t.at,within: y,elem: a})
            }), e.fn.bgiframe && a.bgiframe(), t.using && (u = function(e) {
                var n = v.left - C.left, s = n + l - f, o = v.top - C.top, u = o + d - c, h = {target: {element: g,left: v.left,top: v.top,width: l,height: d},element: {element: a,left: C.left,top: C.top,width: f,height: c},horizontal: s < 0 ? "left" : n > 0 ? "right" : "center",vertical: u < 0 ? "top" : o > 0 ? "bottom" : "middle"};
                l < f && i(n + s) < l && (h.horizontal = "center"), d < c && i(o + u) < d && (h.vertical = "middle"), r(i(n), i(s)) > r(i(o), i(u)) ? h.important = "horizontal" : h.important = "vertical", t.using.call(this, e, h)
            }), a.offset(e.extend(C, {using: u}))
        })
    }, e.ui.position = {fit: {left: function(e, t) {
                var n = t.within, i = n.isWindow ? n.scrollLeft : n.offset.left, s = n.width, o = e.left - t.collisionPosition.marginLeft, u = i - o, a = o + t.collisionWidth - s - i, f;
                t.collisionWidth > s ? u > 0 && a <= 0 ? (f = e.left + u + t.collisionWidth - s - i, e.left += u - f) : a > 0 && u <= 0 ? e.left = i : u > a ? e.left = i + s - t.collisionWidth : e.left = i : u > 0 ? e.left += u : a > 0 ? e.left -= a : e.left = r(e.left - o, e.left)
            },top: function(e, t) {
                var n = t.within, i = n.isWindow ? n.scrollTop : n.offset.top, s = t.within.height, o = e.top - t.collisionPosition.marginTop, u = i - o, a = o + t.collisionHeight - s - i, f;
                t.collisionHeight > s ? u > 0 && a <= 0 ? (f = e.top + u + t.collisionHeight - s - i, e.top += u - f) : a > 0 && u <= 0 ? e.top = i : u > a ? e.top = i + s - t.collisionHeight : e.top = i : u > 0 ? e.top += u : a > 0 ? e.top -= a : e.top = r(e.top - o, e.top)
            }},flip: {left: function(e, t) {
                var n = t.within, r = n.offset.left + n.scrollLeft, s = n.width, o = n.isWindow ? n.scrollLeft : n.offset.left, u = e.left - t.collisionPosition.marginLeft, a = u - o, f = u + t.collisionWidth - s - o, l = t.my[0] === "left" ? -t.elemWidth : t.my[0] === "right" ? t.elemWidth : 0, c = t.at[0] === "left" ? t.targetWidth : t.at[0] === "right" ? -t.targetWidth : 0, h = -2 * t.offset[0], p, d;
                if (a < 0) {
                    p = e.left + l + c + h + t.collisionWidth - s - r;
                    if (p < 0 || p < i(a))
                        e.left += l + c + h
                } else if (f > 0) {
                    d = e.left - t.collisionPosition.marginLeft + l + c + h - o;
                    if (d > 0 || i(d) < f)
                        e.left += l + c + h
                }
            },top: function(e, t) {
                var n = t.within, r = n.offset.top + n.scrollTop, s = n.height, o = n.isWindow ? n.scrollTop : n.offset.top, u = e.top - t.collisionPosition.marginTop, a = u - o, f = u + t.collisionHeight - s - o, l = t.my[1] === "top", c = l ? -t.elemHeight : t.my[1] === "bottom" ? t.elemHeight : 0, h = t.at[1] === "top" ? t.targetHeight : t.at[1] === "bottom" ? -t.targetHeight : 0, p = -2 * t.offset[1], d, v;
                a < 0 ? (v = e.top + c + h + p + t.collisionHeight - s - r, e.top + c + h + p > a && (v < 0 || v < i(a)) && (e.top += c + h + p)) : f > 0 && (d = e.top - t.collisionPosition.marginTop + c + h + p - o, e.top + c + h + p > f && (d > 0 || i(d) < f) && (e.top += c + h + p))
            }},flipfit: {left: function() {
                e.ui.position.flip.left.apply(this, arguments), e.ui.position.fit.left.apply(this, arguments)
            },top: function() {
                e.ui.position.flip.top.apply(this, arguments), e.ui.position.fit.top.apply(this, arguments)
            }}}, function() {
        var t, n, r, i, s, o = document.getElementsByTagName("body")[0], u = document.createElement("div");
        t = document.createElement(o ? "div" : "body"), r = {visibility: "hidden",width: 0,height: 0,border: 0,margin: 0,background: "none"}, o && e.extend(r, {position: "absolute",left: "-1000px",top: "-1000px"});
        for (s in r)
            t.style[s] = r[s];
        t.appendChild(u), n = o || document.documentElement, n.insertBefore(t, n.firstChild), u.style.cssText = "position: absolute; left: 10.7432222px;", i = e(u).offset().left, e.support.offsetFractions = i > 10 && i < 11, t.innerHTML = "", n.removeChild(t)
    }(), e.uiBackCompat !== !1 && function(e) {
        var n = e.fn.position;
        e.fn.position = function(r) {
            if (!r || !r.offset)
                return n.call(this, r);
            var i = r.offset.split(" "), s = r.at.split(" ");
            return i.length === 1 && (i[1] = i[0]), /^\d/.test(i[0]) && (i[0] = "+" + i[0]), /^\d/.test(i[1]) && (i[1] = "+" + i[1]), s.length === 1 && (/left|center|right/.test(s[0]) ? s[1] = "center" : (s[1] = s[0], s[0] = "center")), n.call(this, e.extend(r, {at: s[0] + i[0] + " " + s[1] + i[1],offset: t}))
        }
    }(jQuery)
})(jQuery);
(function(e, t) {
    e.widget("ui.draggable", e.ui.mouse, {version: "1.9.2",widgetEventPrefix: "drag",options: {addClasses: !0,appendTo: "parent",axis: !1,connectToSortable: !1,containment: !1,cursor: "auto",cursorAt: !1,grid: !1,handle: !1,helper: "original",iframeFix: !1,opacity: !1,refreshPositions: !1,revert: !1,revertDuration: 500,scope: "default",scroll: !0,scrollSensitivity: 20,scrollSpeed: 20,snap: !1,snapMode: "both",snapTolerance: 20,stack: !1,zIndex: !1},_create: function() {
            this.options.helper == "original" && !/^(?:r|a|f)/.test(this.element.css("position")) && (this.element[0].style.position = "relative"), this.options.addClasses && this.element.addClass("ui-draggable"), this.options.disabled && this.element.addClass("ui-draggable-disabled"), this._mouseInit()
        },_destroy: function() {
            this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"), this._mouseDestroy()
        },_mouseCapture: function(t) {
            var n = this.options;
            return this.helper || n.disabled || e(t.target).is(".ui-resizable-handle") ? !1 : (this.handle = this._getHandle(t), this.handle ? (e(n.iframeFix === !0 ? "iframe" : n.iframeFix).each(function() {
                e('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width: this.offsetWidth + "px",height: this.offsetHeight + "px",position: "absolute",opacity: "0.001",zIndex: 1e3}).css(e(this).offset()).appendTo("body")
            }), !0) : !1)
        },_mouseStart: function(t) {
            var n = this.options;
            return this.helper = this._createHelper(t), this.helper.addClass("ui-draggable-dragging"), this._cacheHelperProportions(), e.ui.ddmanager && (e.ui.ddmanager.current = this), this._cacheMargins(), this.cssPosition = this.helper.css("position"), this.scrollParent = this.helper.scrollParent(), this.offset = this.positionAbs = this.element.offset(), this.offset = {top: this.offset.top - this.margins.top,left: this.offset.left - this.margins.left}, e.extend(this.offset, {click: {left: t.pageX - this.offset.left,top: t.pageY - this.offset.top},parent: this._getParentOffset(),relative: this._getRelativeOffset()}), this.originalPosition = this.position = this._generatePosition(t), this.originalPageX = t.pageX, this.originalPageY = t.pageY, n.cursorAt && this._adjustOffsetFromHelper(n.cursorAt), n.containment && this._setContainment(), this._trigger("start", t) === !1 ? (this._clear(), !1) : (this._cacheHelperProportions(), e.ui.ddmanager && !n.dropBehaviour && e.ui.ddmanager.prepareOffsets(this, t), this._mouseDrag(t, !0), e.ui.ddmanager && e.ui.ddmanager.dragStart(this, t), !0)
        },_mouseDrag: function(t, n) {
            this.position = this._generatePosition(t), this.positionAbs = this._convertPositionTo("absolute");
            if (!n) {
                var r = this._uiHash();
                if (this._trigger("drag", t, r) === !1)
                    return this._mouseUp({}), !1;
                this.position = r.position
            }
            if (!this.options.axis || this.options.axis != "y")
                this.helper[0].style.left = this.position.left + "px";
            if (!this.options.axis || this.options.axis != "x")
                this.helper[0].style.top = this.position.top + "px";
            return e.ui.ddmanager && e.ui.ddmanager.drag(this, t), !1
        },_mouseStop: function(t) {
            var n = !1;
            e.ui.ddmanager && !this.options.dropBehaviour && (n = e.ui.ddmanager.drop(this, t)), this.dropped && (n = this.dropped, this.dropped = !1);
            var r = this.element[0], i = !1;
            while (r && (r = r.parentNode))
                r == document && (i = !0);
            if (!i && this.options.helper === "original")
                return !1;
            if (this.options.revert == "invalid" && !n || this.options.revert == "valid" && n || this.options.revert === !0 || e.isFunction(this.options.revert) && this.options.revert.call(this.element, n)) {
                var s = this;
                e(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
                    s._trigger("stop", t) !== !1 && s._clear()
                })
            } else
                this._trigger("stop", t) !== !1 && this._clear();
            return !1
        },_mouseUp: function(t) {
            return e("div.ui-draggable-iframeFix").each(function() {
                this.parentNode.removeChild(this)
            }), e.ui.ddmanager && e.ui.ddmanager.dragStop(this, t), e.ui.mouse.prototype._mouseUp.call(this, t)
        },cancel: function() {
            return this.helper.is(".ui-draggable-dragging") ? this._mouseUp({}) : this._clear(), this
        },_getHandle: function(t) {
            var n = !this.options.handle || !e(this.options.handle, this.element).length ? !0 : !1;
            return e(this.options.handle, this.element).find("*").andSelf().each(function() {
                this == t.target && (n = !0)
            }), n
        },_createHelper: function(t) {
            var n = this.options, r = e.isFunction(n.helper) ? e(n.helper.apply(this.element[0], [t])) : n.helper == "clone" ? this.element.clone().removeAttr("id") : this.element;
            return r.parents("body").length || r.appendTo(n.appendTo == "parent" ? this.element[0].parentNode : n.appendTo), r[0] != this.element[0] && !/(fixed|absolute)/.test(r.css("position")) && r.css("position", "absolute"), r
        },_adjustOffsetFromHelper: function(t) {
            typeof t == "string" && (t = t.split(" ")), e.isArray(t) && (t = {left: +t[0],top: +t[1] || 0}), "left" in t && (this.offset.click.left = t.left + this.margins.left), "right" in t && (this.offset.click.left = this.helperProportions.width - t.right + this.margins.left), "top" in t && (this.offset.click.top = t.top + this.margins.top), "bottom" in t && (this.offset.click.top = this.helperProportions.height - t.bottom + this.margins.top)
        },_getParentOffset: function() {
            this.offsetParent = this.helper.offsetParent();
            var t = this.offsetParent.offset();
            this.cssPosition == "absolute" && this.scrollParent[0] != document && e.contains(this.scrollParent[0], this.offsetParent[0]) && (t.left += this.scrollParent.scrollLeft(), t.top += this.scrollParent.scrollTop());
            if (this.offsetParent[0] == document.body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && e.ui.ie)
                t = {top: 0,left: 0};
            return {top: t.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),left: t.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)}
        },_getRelativeOffset: function() {
            if (this.cssPosition == "relative") {
                var e = this.element.position();
                return {top: e.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),left: e.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()}
            }
            return {top: 0,left: 0}
        },_cacheMargins: function() {
            this.margins = {left: parseInt(this.element.css("marginLeft"), 10) || 0,top: parseInt(this.element.css("marginTop"), 10) || 0,right: parseInt(this.element.css("marginRight"), 10) || 0,bottom: parseInt(this.element.css("marginBottom"), 10) || 0}
        },_cacheHelperProportions: function() {
            this.helperProportions = {width: this.helper.outerWidth(),height: this.helper.outerHeight()}
        },_setContainment: function() {
            var t = this.options;
            t.containment == "parent" && (t.containment = this.helper[0].parentNode);
            if (t.containment == "document" || t.containment == "window")
                this.containment = [t.containment == "document" ? 0 : e(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, t.containment == "document" ? 0 : e(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, (t.containment == "document" ? 0 : e(window).scrollLeft()) + e(t.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (t.containment == "document" ? 0 : e(window).scrollTop()) + (e(t.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top];
            if (!/^(document|window|parent)$/.test(t.containment) && t.containment.constructor != Array) {
                var n = e(t.containment), r = n[0];
                if (!r)
                    return;
                var i = n.offset(), s = e(r).css("overflow") != "hidden";
                this.containment = [(parseInt(e(r).css("borderLeftWidth"), 10) || 0) + (parseInt(e(r).css("paddingLeft"), 10) || 0), (parseInt(e(r).css("borderTopWidth"), 10) || 0) + (parseInt(e(r).css("paddingTop"), 10) || 0), (s ? Math.max(r.scrollWidth, r.offsetWidth) : r.offsetWidth) - (parseInt(e(r).css("borderLeftWidth"), 10) || 0) - (parseInt(e(r).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (s ? Math.max(r.scrollHeight, r.offsetHeight) : r.offsetHeight) - (parseInt(e(r).css("borderTopWidth"), 10) || 0) - (parseInt(e(r).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom], this.relative_container = n
            } else
                t.containment.constructor == Array && (this.containment = t.containment)
        },_convertPositionTo: function(t, n) {
            n || (n = this.position);
            var r = t == "absolute" ? 1 : -1, i = this.options, s = this.cssPosition != "absolute" || this.scrollParent[0] != document && !!e.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, o = /(html|body)/i.test(s[0].tagName);
            return {top: n.top + this.offset.relative.top * r + this.offset.parent.top * r - (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : o ? 0 : s.scrollTop()) * r,left: n.left + this.offset.relative.left * r + this.offset.parent.left * r - (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : o ? 0 : s.scrollLeft()) * r}
        },_generatePosition: function(t) {
            var n = this.options, r = this.cssPosition != "absolute" || this.scrollParent[0] != document && !!e.contains(this.scrollParent[0], this.offsetParent[0]) ? this.scrollParent : this.offsetParent, i = /(html|body)/i.test(r[0].tagName), s = t.pageX, o = t.pageY;
            if (this.originalPosition) {
                var u;
                if (this.containment) {
                    if (this.relative_container) {
                        var a = this.relative_container.offset();
                        u = [this.containment[0] + a.left, this.containment[1] + a.top, this.containment[2] + a.left, this.containment[3] + a.top]
                    } else
                        u = this.containment;
                    t.pageX - this.offset.click.left < u[0] && (s = u[0] + this.offset.click.left), t.pageY - this.offset.click.top < u[1] && (o = u[1] + this.offset.click.top), t.pageX - this.offset.click.left > u[2] && (s = u[2] + this.offset.click.left), t.pageY - this.offset.click.top > u[3] && (o = u[3] + this.offset.click.top)
                }
                if (n.grid) {
                    var f = n.grid[1] ? this.originalPageY + Math.round((o - this.originalPageY) / n.grid[1]) * n.grid[1] : this.originalPageY;
                    o = u ? f - this.offset.click.top < u[1] || f - this.offset.click.top > u[3] ? f - this.offset.click.top < u[1] ? f + n.grid[1] : f - n.grid[1] : f : f;
                    var l = n.grid[0] ? this.originalPageX + Math.round((s - this.originalPageX) / n.grid[0]) * n.grid[0] : this.originalPageX;
                    s = u ? l - this.offset.click.left < u[0] || l - this.offset.click.left > u[2] ? l - this.offset.click.left < u[0] ? l + n.grid[0] : l - n.grid[0] : l : l
                }
            }
            return {top: o - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : i ? 0 : r.scrollTop()),left: s - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : i ? 0 : r.scrollLeft())}
        },_clear: function() {
            this.helper.removeClass("ui-draggable-dragging"), this.helper[0] != this.element[0] && !this.cancelHelperRemoval && this.helper.remove(), this.helper = null, this.cancelHelperRemoval = !1
        },_trigger: function(t, n, r) {
            return r = r || this._uiHash(), e.ui.plugin.call(this, t, [n, r]), t == "drag" && (this.positionAbs = this._convertPositionTo("absolute")), e.Widget.prototype._trigger.call(this, t, n, r)
        },plugins: {},_uiHash: function(e) {
            return {helper: this.helper,position: this.position,originalPosition: this.originalPosition,offset: this.positionAbs}
        }}), e.ui.plugin.add("draggable", "connectToSortable", {start: function(t, n) {
            var r = e(this).data("draggable"), i = r.options, s = e.extend({}, n, {item: r.element});
            r.sortables = [], e(i.connectToSortable).each(function() {
                var n = e.data(this, "sortable");
                n && !n.options.disabled && (r.sortables.push({instance: n,shouldRevert: n.options.revert}), n.refreshPositions(), n._trigger("activate", t, s))
            })
        },stop: function(t, n) {
            var r = e(this).data("draggable"), i = e.extend({}, n, {item: r.element});
            e.each(r.sortables, function() {
                this.instance.isOver ? (this.instance.isOver = 0, r.cancelHelperRemoval = !0, this.instance.cancelHelperRemoval = !1, this.shouldRevert && (this.instance.options.revert = !0), this.instance._mouseStop(t), this.instance.options.helper = this.instance.options._helper, r.options.helper == "original" && this.instance.currentItem.css({top: "auto",left: "auto"})) : (this.instance.cancelHelperRemoval = !1, this.instance._trigger("deactivate", t, i))
            })
        },drag: function(t, n) {
            var r = e(this).data("draggable"), i = this, s = function(t) {
                var n = this.offset.click.top, r = this.offset.click.left, i = this.positionAbs.top, s = this.positionAbs.left, o = t.height, u = t.width, a = t.top, f = t.left;
                return e.ui.isOver(i + n, s + r, a, f, o, u)
            };
            e.each(r.sortables, function(s) {
                var o = !1, u = this;
                this.instance.positionAbs = r.positionAbs, this.instance.helperProportions = r.helperProportions, this.instance.offset.click = r.offset.click, this.instance._intersectsWith(this.instance.containerCache) && (o = !0, e.each(r.sortables, function() {
                    return this.instance.positionAbs = r.positionAbs, this.instance.helperProportions = r.helperProportions, this.instance.offset.click = r.offset.click, this != u && this.instance._intersectsWith(this.instance.containerCache) && e.ui.contains(u.instance.element[0], this.instance.element[0]) && (o = !1), o
                })), o ? (this.instance.isOver || (this.instance.isOver = 1, this.instance.currentItem = e(i).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item", !0), this.instance.options._helper = this.instance.options.helper, this.instance.options.helper = function() {
                    return n.helper[0]
                }, t.target = this.instance.currentItem[0], this.instance._mouseCapture(t, !0), this.instance._mouseStart(t, !0, !0), this.instance.offset.click.top = r.offset.click.top, this.instance.offset.click.left = r.offset.click.left, this.instance.offset.parent.left -= r.offset.parent.left - this.instance.offset.parent.left, this.instance.offset.parent.top -= r.offset.parent.top - this.instance.offset.parent.top, r._trigger("toSortable", t), r.dropped = this.instance.element, r.currentItem = r.element, this.instance.fromOutside = r), this.instance.currentItem && this.instance._mouseDrag(t)) : this.instance.isOver && (this.instance.isOver = 0, this.instance.cancelHelperRemoval = !0, this.instance.options.revert = !1, this.instance._trigger("out", t, this.instance._uiHash(this.instance)), this.instance._mouseStop(t, !0), this.instance.options.helper = this.instance.options._helper, this.instance.currentItem.remove(), this.instance.placeholder && this.instance.placeholder.remove(), r._trigger("fromSortable", t), r.dropped = !1)
            })
        }}), e.ui.plugin.add("draggable", "cursor", {start: function(t, n) {
            var r = e("body"), i = e(this).data("draggable").options;
            r.css("cursor") && (i._cursor = r.css("cursor")), r.css("cursor", i.cursor)
        },stop: function(t, n) {
            var r = e(this).data("draggable").options;
            r._cursor && e("body").css("cursor", r._cursor)
        }}), e.ui.plugin.add("draggable", "opacity", {start: function(t, n) {
            var r = e(n.helper), i = e(this).data("draggable").options;
            r.css("opacity") && (i._opacity = r.css("opacity")), r.css("opacity", i.opacity)
        },stop: function(t, n) {
            var r = e(this).data("draggable").options;
            r._opacity && e(n.helper).css("opacity", r._opacity)
        }}), e.ui.plugin.add("draggable", "scroll", {start: function(t, n) {
            var r = e(this).data("draggable");
            r.scrollParent[0] != document && r.scrollParent[0].tagName != "HTML" && (r.overflowOffset = r.scrollParent.offset())
        },drag: function(t, n) {
            var r = e(this).data("draggable"), i = r.options, s = !1;
            if (r.scrollParent[0] != document && r.scrollParent[0].tagName != "HTML") {
                if (!i.axis || i.axis != "x")
                    r.overflowOffset.top + r.scrollParent[0].offsetHeight - t.pageY < i.scrollSensitivity ? r.scrollParent[0].scrollTop = s = r.scrollParent[0].scrollTop + i.scrollSpeed : t.pageY - r.overflowOffset.top < i.scrollSensitivity && (r.scrollParent[0].scrollTop = s = r.scrollParent[0].scrollTop - i.scrollSpeed);
                if (!i.axis || i.axis != "y")
                    r.overflowOffset.left + r.scrollParent[0].offsetWidth - t.pageX < i.scrollSensitivity ? r.scrollParent[0].scrollLeft = s = r.scrollParent[0].scrollLeft + i.scrollSpeed : t.pageX - r.overflowOffset.left < i.scrollSensitivity && (r.scrollParent[0].scrollLeft = s = r.scrollParent[0].scrollLeft - i.scrollSpeed)
            } else {
                if (!i.axis || i.axis != "x")
                    t.pageY - e(document).scrollTop() < i.scrollSensitivity ? s = e(document).scrollTop(e(document).scrollTop() - i.scrollSpeed) : e(window).height() - (t.pageY - e(document).scrollTop()) < i.scrollSensitivity && (s = e(document).scrollTop(e(document).scrollTop() + i.scrollSpeed));
                if (!i.axis || i.axis != "y")
                    t.pageX - e(document).scrollLeft() < i.scrollSensitivity ? s = e(document).scrollLeft(e(document).scrollLeft() - i.scrollSpeed) : e(window).width() - (t.pageX - e(document).scrollLeft()) < i.scrollSensitivity && (s = e(document).scrollLeft(e(document).scrollLeft() + i.scrollSpeed))
            }
            s !== !1 && e.ui.ddmanager && !i.dropBehaviour && e.ui.ddmanager.prepareOffsets(r, t)
        }}), e.ui.plugin.add("draggable", "snap", {start: function(t, n) {
            var r = e(this).data("draggable"), i = r.options;
            r.snapElements = [], e(i.snap.constructor != String ? i.snap.items || ":data(draggable)" : i.snap).each(function() {
                var t = e(this), n = t.offset();
                this != r.element[0] && r.snapElements.push({item: this,width: t.outerWidth(),height: t.outerHeight(),top: n.top,left: n.left})
            })
        },drag: function(t, n) {
            var r = e(this).data("draggable"), i = r.options, s = i.snapTolerance, o = n.offset.left, u = o + r.helperProportions.width, a = n.offset.top, f = a + r.helperProportions.height;
            for (var l = r.snapElements.length - 1; l >= 0; l--) {
                var c = r.snapElements[l].left, h = c + r.snapElements[l].width, p = r.snapElements[l].top, d = p + r.snapElements[l].height;
                if (!(c - s < o && o < h + s && p - s < a && a < d + s || c - s < o && o < h + s && p - s < f && f < d + s || c - s < u && u < h + s && p - s < a && a < d + s || c - s < u && u < h + s && p - s < f && f < d + s)) {
                    r.snapElements[l].snapping && r.options.snap.release && r.options.snap.release.call(r.element, t, e.extend(r._uiHash(), {snapItem: r.snapElements[l].item})), r.snapElements[l].snapping = !1;
                    continue
                }
                if (i.snapMode != "inner") {
                    var v = Math.abs(p - f) <= s, m = Math.abs(d - a) <= s, g = Math.abs(c - u) <= s, y = Math.abs(h - o) <= s;
                    v && (n.position.top = r._convertPositionTo("relative", {top: p - r.helperProportions.height,left: 0}).top - r.margins.top), m && (n.position.top = r._convertPositionTo("relative", {top: d,left: 0}).top - r.margins.top), g && (n.position.left = r._convertPositionTo("relative", {top: 0,left: c - r.helperProportions.width}).left - r.margins.left), y && (n.position.left = r._convertPositionTo("relative", {top: 0,left: h}).left - r.margins.left)
                }
                var b = v || m || g || y;
                if (i.snapMode != "outer") {
                    var v = Math.abs(p - a) <= s, m = Math.abs(d - f) <= s, g = Math.abs(c - o) <= s, y = Math.abs(h - u) <= s;
                    v && (n.position.top = r._convertPositionTo("relative", {top: p,left: 0}).top - r.margins.top), m && (n.position.top = r._convertPositionTo("relative", {top: d - r.helperProportions.height,left: 0}).top - r.margins.top), g && (n.position.left = r._convertPositionTo("relative", {top: 0,left: c}).left - r.margins.left), y && (n.position.left = r._convertPositionTo("relative", {top: 0,left: h - r.helperProportions.width}).left - r.margins.left)
                }
                !r.snapElements[l].snapping && (v || m || g || y || b) && r.options.snap.snap && r.options.snap.snap.call(r.element, t, e.extend(r._uiHash(), {snapItem: r.snapElements[l].item})), r.snapElements[l].snapping = v || m || g || y || b
            }
        }}), e.ui.plugin.add("draggable", "stack", {start: function(t, n) {
            var r = e(this).data("draggable").options, i = e.makeArray(e(r.stack)).sort(function(t, n) {
                return (parseInt(e(t).css("zIndex"), 10) || 0) - (parseInt(e(n).css("zIndex"), 10) || 0)
            });
            if (!i.length)
                return;
            var s = parseInt(i[0].style.zIndex) || 0;
            e(i).each(function(e) {
                this.style.zIndex = s + e
            }), this[0].style.zIndex = s + i.length
        }}), e.ui.plugin.add("draggable", "zIndex", {start: function(t, n) {
            var r = e(n.helper), i = e(this).data("draggable").options;
            r.css("zIndex") && (i._zIndex = r.css("zIndex")), r.css("zIndex", i.zIndex)
        },stop: function(t, n) {
            var r = e(this).data("draggable").options;
            r._zIndex && e(n.helper).css("zIndex", r._zIndex)
        }})
})(jQuery);
(function(e, t) {
    e.widget("ui.resizable", e.ui.mouse, {version: "1.9.2",widgetEventPrefix: "resize",options: {alsoResize: !1,animate: !1,animateDuration: "slow",animateEasing: "swing",aspectRatio: !1,autoHide: !1,containment: !1,ghost: !1,grid: !1,handles: "e,s,se",helper: !1,maxHeight: null,maxWidth: null,minHeight: 10,minWidth: 10,zIndex: 1e3},_create: function() {
            var t = this, n = this.options;
            this.element.addClass("ui-resizable"), e.extend(this, {_aspectRatio: !!n.aspectRatio,aspectRatio: n.aspectRatio,originalElement: this.element,_proportionallyResizeElements: [],_helper: n.helper || n.ghost || n.animate ? n.helper || "ui-resizable-helper" : null}), this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i) && (this.element.wrap(e('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position: this.element.css("position"),width: this.element.outerWidth(),height: this.element.outerHeight(),top: this.element.css("top"),left: this.element.css("left")})), this.element = this.element.parent().data("resizable", this.element.data("resizable")), this.elementIsWrapper = !0, this.element.css({marginLeft: this.originalElement.css("marginLeft"),marginTop: this.originalElement.css("marginTop"),marginRight: this.originalElement.css("marginRight"),marginBottom: this.originalElement.css("marginBottom")}), this.originalElement.css({marginLeft: 0,marginTop: 0,marginRight: 0,marginBottom: 0}), this.originalResizeStyle = this.originalElement.css("resize"), this.originalElement.css("resize", "none"), this._proportionallyResizeElements.push(this.originalElement.css({position: "static",zoom: 1,display: "block"})), this.originalElement.css({margin: this.originalElement.css("margin")}), this._proportionallyResize()), this.handles = n.handles || (e(".ui-resizable-handle", this.element).length ? {n: ".ui-resizable-n",e: ".ui-resizable-e",s: ".ui-resizable-s",w: ".ui-resizable-w",se: ".ui-resizable-se",sw: ".ui-resizable-sw",ne: ".ui-resizable-ne",nw: ".ui-resizable-nw"} : "e,s,se");
            if (this.handles.constructor == String) {
                this.handles == "all" && (this.handles = "n,e,s,w,se,sw,ne,nw");
                var r = this.handles.split(",");
                this.handles = {};
                for (var i = 0; i < r.length; i++) {
                    var s = e.trim(r[i]), o = "ui-resizable-" + s, u = e('<div class="ui-resizable-handle ' + o + '"></div>');
                    u.css({zIndex: n.zIndex}), "se" == s && u.addClass("ui-icon ui-icon-gripsmall-diagonal-se"), this.handles[s] = ".ui-resizable-" + s, this.element.append(u)
                }
            }
            this._renderAxis = function(t) {
                t = t || this.element;
                for (var n in this.handles) {
                    this.handles[n].constructor == String && (this.handles[n] = e(this.handles[n], this.element).show());
                    if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
                        var r = e(this.handles[n], this.element), i = 0;
                        i = /sw|ne|nw|se|n|s/.test(n) ? r.outerHeight() : r.outerWidth();
                        var s = ["padding", /ne|nw|n/.test(n) ? "Top" : /se|sw|s/.test(n) ? "Bottom" : /^e$/.test(n) ? "Right" : "Left"].join("");
                        t.css(s, i), this._proportionallyResize()
                    }
                    if (!e(this.handles[n]).length)
                        continue
                }
            }, this._renderAxis(this.element), this._handles = e(".ui-resizable-handle", this.element).disableSelection(), this._handles.mouseover(function() {
                if (!t.resizing) {
                    if (this.className)
                        var e = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
                    t.axis = e && e[1] ? e[1] : "se"
                }
            }), n.autoHide && (this._handles.hide(), e(this.element).addClass("ui-resizable-autohide").mouseenter(function() {
                if (n.disabled)
                    return;
                e(this).removeClass("ui-resizable-autohide"), t._handles.show()
            }).mouseleave(function() {
                if (n.disabled)
                    return;
                t.resizing || (e(this).addClass("ui-resizable-autohide"), t._handles.hide())
            })), this._mouseInit()
        },_destroy: function() {
            this._mouseDestroy();
            var t = function(t) {
                e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()
            };
            if (this.elementIsWrapper) {
                t(this.element);
                var n = this.element;
                this.originalElement.css({position: n.css("position"),width: n.outerWidth(),height: n.outerHeight(),top: n.css("top"),left: n.css("left")}).insertAfter(n), n.remove()
            }
            return this.originalElement.css("resize", this.originalResizeStyle), t(this.originalElement), this
        },_mouseCapture: function(t) {
            var n = !1;
            for (var r in this.handles)
                e(this.handles[r])[0] == t.target && (n = !0);
            return !this.options.disabled && n
        },_mouseStart: function(t) {
            var r = this.options, i = this.element.position(), s = this.element;
            this.resizing = !0, this.documentScroll = {top: e(document).scrollTop(),left: e(document).scrollLeft()}, (s.is(".ui-draggable") || /absolute/.test(s.css("position"))) && s.css({position: "absolute",top: i.top,left: i.left}), this._renderProxy();
            var o = n(this.helper.css("left")), u = n(this.helper.css("top"));
            r.containment && (o += e(r.containment).scrollLeft() || 0, u += e(r.containment).scrollTop() || 0), this.offset = this.helper.offset(), this.position = {left: o,top: u}, this.size = this._helper ? {width: s.outerWidth(),height: s.outerHeight()} : {width: s.width(),height: s.height()}, this.originalSize = this._helper ? {width: s.outerWidth(),height: s.outerHeight()} : {width: s.width(),height: s.height()}, this.originalPosition = {left: o,top: u}, this.sizeDiff = {width: s.outerWidth() - s.width(),height: s.outerHeight() - s.height()}, this.originalMousePosition = {left: t.pageX,top: t.pageY}, this.aspectRatio = typeof r.aspectRatio == "number" ? r.aspectRatio : this.originalSize.width / this.originalSize.height || 1;
            var a = e(".ui-resizable-" + this.axis).css("cursor");
            return e("body").css("cursor", a == "auto" ? this.axis + "-resize" : a), s.addClass("ui-resizable-resizing"), this._propagate("start", t), !0
        },_mouseDrag: function(e) {
            var t = this.helper, n = this.options, r = {}, i = this, s = this.originalMousePosition, o = this.axis, u = e.pageX - s.left || 0, a = e.pageY - s.top || 0, f = this._change[o];
            if (!f)
                return !1;
            var l = f.apply(this, [e, u, a]);
            this._updateVirtualBoundaries(e.shiftKey);
            if (this._aspectRatio || e.shiftKey)
                l = this._updateRatio(l, e);
            return l = this._respectSize(l, e), this._propagate("resize", e), t.css({top: this.position.top + "px",left: this.position.left + "px",width: this.size.width + "px",height: this.size.height + "px"}), !this._helper && this._proportionallyResizeElements.length && this._proportionallyResize(), this._updateCache(l), this._trigger("resize", e, this.ui()), !1
        },_mouseStop: function(t) {
            this.resizing = !1;
            var n = this.options, r = this;
            if (this._helper) {
                var i = this._proportionallyResizeElements, s = i.length && /textarea/i.test(i[0].nodeName), o = s && e.ui.hasScroll(i[0], "left") ? 0 : r.sizeDiff.height, u = s ? 0 : r.sizeDiff.width, a = {width: r.helper.width() - u,height: r.helper.height() - o}, f = parseInt(r.element.css("left"), 10) + (r.position.left - r.originalPosition.left) || null, l = parseInt(r.element.css("top"), 10) + (r.position.top - r.originalPosition.top) || null;
                n.animate || this.element.css(e.extend(a, {top: l,left: f})), r.helper.height(r.size.height), r.helper.width(r.size.width), this._helper && !n.animate && this._proportionallyResize()
            }
            return e("body").css("cursor", "auto"), this.element.removeClass("ui-resizable-resizing"), this._propagate("stop", t), this._helper && this.helper.remove(), !1
        },_updateVirtualBoundaries: function(e) {
            var t = this.options, n, i, s, o, u;
            u = {minWidth: r(t.minWidth) ? t.minWidth : 0,maxWidth: r(t.maxWidth) ? t.maxWidth : Infinity,minHeight: r(t.minHeight) ? t.minHeight : 0,maxHeight: r(t.maxHeight) ? t.maxHeight : Infinity};
            if (this._aspectRatio || e)
                n = u.minHeight * this.aspectRatio, s = u.minWidth / this.aspectRatio, i = u.maxHeight * this.aspectRatio, o = u.maxWidth / this.aspectRatio, n > u.minWidth && (u.minWidth = n), s > u.minHeight && (u.minHeight = s), i < u.maxWidth && (u.maxWidth = i), o < u.maxHeight && (u.maxHeight = o);
            this._vBoundaries = u
        },_updateCache: function(e) {
            var t = this.options;
            this.offset = this.helper.offset(), r(e.left) && (this.position.left = e.left), r(e.top) && (this.position.top = e.top), r(e.height) && (this.size.height = e.height), r(e.width) && (this.size.width = e.width)
        },_updateRatio: function(e, t) {
            var n = this.options, i = this.position, s = this.size, o = this.axis;
            return r(e.height) ? e.width = e.height * this.aspectRatio : r(e.width) && (e.height = e.width / this.aspectRatio), o == "sw" && (e.left = i.left + (s.width - e.width), e.top = null), o == "nw" && (e.top = i.top + (s.height - e.height), e.left = i.left + (s.width - e.width)), e
        },_respectSize: function(e, t) {
            var n = this.helper, i = this._vBoundaries, s = this._aspectRatio || t.shiftKey, o = this.axis, u = r(e.width) && i.maxWidth && i.maxWidth < e.width, a = r(e.height) && i.maxHeight && i.maxHeight < e.height, f = r(e.width) && i.minWidth && i.minWidth > e.width, l = r(e.height) && i.minHeight && i.minHeight > e.height;
            f && (e.width = i.minWidth), l && (e.height = i.minHeight), u && (e.width = i.maxWidth), a && (e.height = i.maxHeight);
            var c = this.originalPosition.left + this.originalSize.width, h = this.position.top + this.size.height, p = /sw|nw|w/.test(o), d = /nw|ne|n/.test(o);
            f && p && (e.left = c - i.minWidth), u && p && (e.left = c - i.maxWidth), l && d && (e.top = h - i.minHeight), a && d && (e.top = h - i.maxHeight);
            var v = !e.width && !e.height;
            return v && !e.left && e.top ? e.top = null : v && !e.top && e.left && (e.left = null), e
        },_proportionallyResize: function() {
            var t = this.options;
            if (!this._proportionallyResizeElements.length)
                return;
            var n = this.helper || this.element;
            for (var r = 0; r < this._proportionallyResizeElements.length; r++) {
                var i = this._proportionallyResizeElements[r];
                if (!this.borderDif) {
                    var s = [i.css("borderTopWidth"), i.css("borderRightWidth"), i.css("borderBottomWidth"), i.css("borderLeftWidth")], o = [i.css("paddingTop"), i.css("paddingRight"), i.css("paddingBottom"), i.css("paddingLeft")];
                    this.borderDif = e.map(s, function(e, t) {
                        var n = parseInt(e, 10) || 0, r = parseInt(o[t], 10) || 0;
                        return n + r
                    })
                }
                i.css({height: n.height() - this.borderDif[0] - this.borderDif[2] || 0,width: n.width() - this.borderDif[1] - this.borderDif[3] || 0})
            }
        },_renderProxy: function() {
            var t = this.element, n = this.options;
            this.elementOffset = t.offset();
            if (this._helper) {
                this.helper = this.helper || e('<div style="overflow:hidden;"></div>');
                var r = e.ui.ie6 ? 1 : 0, i = e.ui.ie6 ? 2 : -1;
                this.helper.addClass(this._helper).css({width: this.element.outerWidth() + i,height: this.element.outerHeight() + i,position: "absolute",left: this.elementOffset.left - r + "px",top: this.elementOffset.top - r + "px",zIndex: ++n.zIndex}), this.helper.appendTo("body").disableSelection()
            } else
                this.helper = this.element
        },_change: {e: function(e, t, n) {
                return {width: this.originalSize.width + t}
            },w: function(e, t, n) {
                var r = this.options, i = this.originalSize, s = this.originalPosition;
                return {left: s.left + t,width: i.width - t}
            },n: function(e, t, n) {
                var r = this.options, i = this.originalSize, s = this.originalPosition;
                return {top: s.top + n,height: i.height - n}
            },s: function(e, t, n) {
                return {height: this.originalSize.height + n}
            },se: function(t, n, r) {
                return e.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [t, n, r]))
            },sw: function(t, n, r) {
                return e.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [t, n, r]))
            },ne: function(t, n, r) {
                return e.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [t, n, r]))
            },nw: function(t, n, r) {
                return e.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [t, n, r]))
            }},_propagate: function(t, n) {
            e.ui.plugin.call(this, t, [n, this.ui()]), t != "resize" && this._trigger(t, n, this.ui())
        },plugins: {},ui: function() {
            return {originalElement: this.originalElement,element: this.element,helper: this.helper,position: this.position,size: this.size,originalSize: this.originalSize,originalPosition: this.originalPosition}
        }}), e.ui.plugin.add("resizable", "alsoResize", {start: function(t, n) {
            var r = e(this).data("resizable"), i = r.options, s = function(t) {
                e(t).each(function() {
                    var t = e(this);
                    t.data("resizable-alsoresize", {width: parseInt(t.width(), 10),height: parseInt(t.height(), 10),left: parseInt(t.css("left"), 10),top: parseInt(t.css("top"), 10)})
                })
            };
            typeof i.alsoResize == "object" && !i.alsoResize.parentNode ? i.alsoResize.length ? (i.alsoResize = i.alsoResize[0], s(i.alsoResize)) : e.each(i.alsoResize, function(e) {
                s(e)
            }) : s(i.alsoResize)
        },resize: function(t, n) {
            var r = e(this).data("resizable"), i = r.options, s = r.originalSize, o = r.originalPosition, u = {height: r.size.height - s.height || 0,width: r.size.width - s.width || 0,top: r.position.top - o.top || 0,left: r.position.left - o.left || 0}, a = function(t, r) {
                e(t).each(function() {
                    var t = e(this), i = e(this).data("resizable-alsoresize"), s = {}, o = r && r.length ? r : t.parents(n.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"];
                    e.each(o, function(e, t) {
                        var n = (i[t] || 0) + (u[t] || 0);
                        n && n >= 0 && (s[t] = n || null)
                    }), t.css(s)
                })
            };
            typeof i.alsoResize == "object" && !i.alsoResize.nodeType ? e.each(i.alsoResize, function(e, t) {
                a(e, t)
            }) : a(i.alsoResize)
        },stop: function(t, n) {
            e(this).removeData("resizable-alsoresize")
        }}), e.ui.plugin.add("resizable", "animate", {stop: function(t, n) {
            var r = e(this).data("resizable"), i = r.options, s = r._proportionallyResizeElements, o = s.length && /textarea/i.test(s[0].nodeName), u = o && e.ui.hasScroll(s[0], "left") ? 0 : r.sizeDiff.height, a = o ? 0 : r.sizeDiff.width, f = {width: r.size.width - a,height: r.size.height - u}, l = parseInt(r.element.css("left"), 10) + (r.position.left - r.originalPosition.left) || null, c = parseInt(r.element.css("top"), 10) + (r.position.top - r.originalPosition.top) || null;
            r.element.animate(e.extend(f, c && l ? {top: c,left: l} : {}), {duration: i.animateDuration,easing: i.animateEasing,step: function() {
                    var n = {width: parseInt(r.element.css("width"), 10),height: parseInt(r.element.css("height"), 10),top: parseInt(r.element.css("top"), 10),left: parseInt(r.element.css("left"), 10)};
                    s && s.length && e(s[0]).css({width: n.width,height: n.height}), r._updateCache(n), r._propagate("resize", t)
                }})
        }}), e.ui.plugin.add("resizable", "containment", {start: function(t, r) {
            var i = e(this).data("resizable"), s = i.options, o = i.element, u = s.containment, a = u instanceof e ? u.get(0) : /parent/.test(u) ? o.parent().get(0) : u;
            if (!a)
                return;
            i.containerElement = e(a);
            if (/document/.test(u) || u == document)
                i.containerOffset = {left: 0,top: 0}, i.containerPosition = {left: 0,top: 0}, i.parentData = {element: e(document),left: 0,top: 0,width: e(document).width(),height: e(document).height() || document.body.parentNode.scrollHeight};
            else {
                var f = e(a), l = [];
                e(["Top", "Right", "Left", "Bottom"]).each(function(e, t) {
                    l[e] = n(f.css("padding" + t))
                }), i.containerOffset = f.offset(), i.containerPosition = f.position(), i.containerSize = {height: f.innerHeight() - l[3],width: f.innerWidth() - l[1]};
                var c = i.containerOffset, h = i.containerSize.height, p = i.containerSize.width, d = e.ui.hasScroll(a, "left") ? a.scrollWidth : p, v = e.ui.hasScroll(a) ? a.scrollHeight : h;
                i.parentData = {element: a,left: c.left,top: c.top,width: d,height: v}
            }
        },resize: function(t, n) {
            var r = e(this).data("resizable"), i = r.options, s = r.containerSize, o = r.containerOffset, u = r.size, a = r.position, f = r._aspectRatio || t.shiftKey, l = {top: 0,left: 0}, c = r.containerElement;
            c[0] != document && /static/.test(c.css("position")) && (l = o), a.left < (r._helper ? o.left : 0) && (r.size.width = r.size.width + (r._helper ? r.position.left - o.left : r.position.left - l.left), f && (r.size.height = r.size.width / r.aspectRatio), r.position.left = i.helper ? o.left : 0), a.top < (r._helper ? o.top : 0) && (r.size.height = r.size.height + (r._helper ? r.position.top - o.top : r.position.top), f && (r.size.width = r.size.height * r.aspectRatio), r.position.top = r._helper ? o.top : 0), r.offset.left = r.parentData.left + r.position.left, r.offset.top = r.parentData.top + r.position.top;
            var h = Math.abs((r._helper ? r.offset.left - l.left : r.offset.left - l.left) + r.sizeDiff.width), p = Math.abs((r._helper ? r.offset.top - l.top : r.offset.top - o.top) + r.sizeDiff.height), d = r.containerElement.get(0) == r.element.parent().get(0), v = /relative|absolute/.test(r.containerElement.css("position"));
            d && v && (h -= r.parentData.left), h + r.size.width >= r.parentData.width && (r.size.width = r.parentData.width - h, f && (r.size.height = r.size.width / r.aspectRatio)), p + r.size.height >= r.parentData.height && (r.size.height = r.parentData.height - p, f && (r.size.width = r.size.height * r.aspectRatio))
        },stop: function(t, n) {
            var r = e(this).data("resizable"), i = r.options, s = r.position, o = r.containerOffset, u = r.containerPosition, a = r.containerElement, f = e(r.helper), l = f.offset(), c = f.outerWidth() - r.sizeDiff.width, h = f.outerHeight() - r.sizeDiff.height;
            r._helper && !i.animate && /relative/.test(a.css("position")) && e(this).css({left: l.left - u.left - o.left,width: c,height: h}), r._helper && !i.animate && /static/.test(a.css("position")) && e(this).css({left: l.left - u.left - o.left,width: c,height: h})
        }}), e.ui.plugin.add("resizable", "ghost", {start: function(t, n) {
            var r = e(this).data("resizable"), i = r.options, s = r.size;
            r.ghost = r.originalElement.clone(), r.ghost.css({opacity: .25,display: "block",position: "relative",height: s.height,width: s.width,margin: 0,left: 0,top: 0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost == "string" ? i.ghost : ""), r.ghost.appendTo(r.helper)
        },resize: function(t, n) {
            var r = e(this).data("resizable"), i = r.options;
            r.ghost && r.ghost.css({position: "relative",height: r.size.height,width: r.size.width})
        },stop: function(t, n) {
            var r = e(this).data("resizable"), i = r.options;
            r.ghost && r.helper && r.helper.get(0).removeChild(r.ghost.get(0))
        }}), e.ui.plugin.add("resizable", "grid", {resize: function(t, n) {
            var r = e(this).data("resizable"), i = r.options, s = r.size, o = r.originalSize, u = r.originalPosition, a = r.axis, f = i._aspectRatio || t.shiftKey;
            i.grid = typeof i.grid == "number" ? [i.grid, i.grid] : i.grid;
            var l = Math.round((s.width - o.width) / (i.grid[0] || 1)) * (i.grid[0] || 1), c = Math.round((s.height - o.height) / (i.grid[1] || 1)) * (i.grid[1] || 1);
            /^(se|s|e)$/.test(a) ? (r.size.width = o.width + l, r.size.height = o.height + c) : /^(ne)$/.test(a) ? (r.size.width = o.width + l, r.size.height = o.height + c, r.position.top = u.top - c) : /^(sw)$/.test(a) ? (r.size.width = o.width + l, r.size.height = o.height + c, r.position.left = u.left - l) : (r.size.width = o.width + l, r.size.height = o.height + c, r.position.top = u.top - c, r.position.left = u.left - l)
        }});
    var n = function(e) {
        return parseInt(e, 10) || 0
    }, r = function(e) {
        return !isNaN(parseInt(e, 10))
    }
})(jQuery);
(function(e, t) {
    var n = 0;
    e.widget("ui.autocomplete", {version: "1.9.2",defaultElement: "<input>",options: {appendTo: "body",autoFocus: !1,delay: 300,minLength: 1,position: {my: "left top",at: "left bottom",collision: "none"},source: null,change: null,close: null,focus: null,open: null,response: null,search: null,select: null},pending: 0,_create: function() {
            var t, n, r;
            this.isMultiLine = this._isMultiLine(), this.valueMethod = this.element[this.element.is("input,textarea") ? "val" : "text"], this.isNewMenu = !0, this.element.addClass("ui-autocomplete-input").attr("autocomplete", "off"), this._on(this.element, {keydown: function(i) {
                    if (this.element.prop("readOnly")) {
                        t = !0, r = !0, n = !0;
                        return
                    }
                    t = !1, r = !1, n = !1;
                    var s = e.ui.keyCode;
                    switch (i.keyCode) {
                        case s.PAGE_UP:
                            t = !0, this._move("previousPage", i);
                            break;
                        case s.PAGE_DOWN:
                            t = !0, this._move("nextPage", i);
                            break;
                        case s.UP:
                            t = !0, this._keyEvent("previous", i);
                            break;
                        case s.DOWN:
                            t = !0, this._keyEvent("next", i);
                            break;
                        case s.ENTER:
                        case s.NUMPAD_ENTER:
                            this.menu.active && (t = !0, i.preventDefault(), this.menu.select(i));
                            break;
                        case s.TAB:
                            this.menu.active && this.menu.select(i);
                            break;
                        case s.ESCAPE:
                            this.menu.element.is(":visible") && (this._value(this.term), this.close(i), i.preventDefault());
                            break;
                        default:
                            n = !0, this._searchTimeout(i)
                    }
                },keypress: function(r) {
                    if (t) {
                        t = !1, r.preventDefault();
                        return
                    }
                    if (n)
                        return;
                    var i = e.ui.keyCode;
                    switch (r.keyCode) {
                        case i.PAGE_UP:
                            this._move("previousPage", r);
                            break;
                        case i.PAGE_DOWN:
                            this._move("nextPage", r);
                            break;
                        case i.UP:
                            this._keyEvent("previous", r);
                            break;
                        case i.DOWN:
                            this._keyEvent("next", r)
                    }
                },input: function(e) {
                    if (r) {
                        r = !1, e.preventDefault();
                        return
                    }
                    this._searchTimeout(e)
                },focus: function() {
                    this.selectedItem = null, this.previous = this._value()
                },blur: function(e) {
                    if (this.cancelBlur) {
                        delete this.cancelBlur;
                        return
                    }
                    clearTimeout(this.searching), this.close(e), this._change(e)
                }}), this._initSource(), this.menu = e("<ul>").addClass("ui-autocomplete").appendTo(this.document.find(this.options.appendTo || "body")[0]).menu({input: e(),role: null}).zIndex(this.element.zIndex() + 1).hide().data("menu"), this._on(this.menu.element, {mousedown: function(t) {
                    t.preventDefault(), this.cancelBlur = !0, this._delay(function() {
                        delete this.cancelBlur
                    });
                    var n = this.menu.element[0];
                    e(t.target).closest(".ui-menu-item").length || this._delay(function() {
                        var t = this;
                        this.document.one("mousedown", function(r) {
                            r.target !== t.element[0] && r.target !== n && !e.contains(n, r.target) && t.close()
                        })
                    })
                },menufocus: function(t, n) {
                    if (this.isNewMenu) {
                        this.isNewMenu = !1;
                        if (t.originalEvent && /^mouse/.test(t.originalEvent.type)) {
                            this.menu.blur(), this.document.one("mousemove", function() {
                                e(t.target).trigger(t.originalEvent)
                            });
                            return
                        }
                    }
                    var r = n.item.data("ui-autocomplete-item") || n.item.data("item.autocomplete");
                    !1 !== this._trigger("focus", t, {item: r}) ? t.originalEvent && /^key/.test(t.originalEvent.type) && this._value(r.value) : this.liveRegion.text(r.value)
                },menuselect: function(e, t) {
                    var n = t.item.data("ui-autocomplete-item") || t.item.data("item.autocomplete"), r = this.previous;
                    this.element[0] !== this.document[0].activeElement && (this.element.focus(), this.previous = r, this._delay(function() {
                        this.previous = r, this.selectedItem = n
                    })), !1 !== this._trigger("select", e, {item: n}) && this._value(n.value), this.term = this._value(), this.close(e), this.selectedItem = n
                }}), this.liveRegion = e("<span>", {role: "status","aria-live": "polite"}).addClass("ui-helper-hidden-accessible").insertAfter(this.element), e.fn.bgiframe && this.menu.element.bgiframe(), this._on(this.window, {beforeunload: function() {
                    this.element.removeAttr("autocomplete")
                }})
        },_destroy: function() {
            clearTimeout(this.searching), this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"), this.menu.element.remove(), this.liveRegion.remove()
        },_setOption: function(e, t) {
            this._super(e, t), e === "source" && this._initSource(), e === "appendTo" && this.menu.element.appendTo(this.document.find(t || "body")[0]), e === "disabled" && t && this.xhr && this.xhr.abort()
        },_isMultiLine: function() {
            return this.element.is("textarea") ? !0 : this.element.is("input") ? !1 : this.element.prop("isContentEditable")
        },_initSource: function() {
            var t, n, r = this;
            e.isArray(this.options.source) ? (t = this.options.source, this.source = function(n, r) {
                r(e.ui.autocomplete.filter(t, n.term))
            }) : typeof this.options.source == "string" ? (n = this.options.source, this.source = function(t, i) {
                r.xhr && r.xhr.abort(), r.xhr = e.ajax({url: n,data: t,dataType: "json",success: function(e) {
                        i(e)
                    },error: function() {
                        i([])
                    }})
            }) : this.source = this.options.source
        },_searchTimeout: function(e) {
            clearTimeout(this.searching), this.searching = this._delay(function() {
                this.term !== this._value() && (this.selectedItem = null, this.search(null, e))
            }, this.options.delay)
        },search: function(e, t) {
            e = e != null ? e : this._value(), this.term = this._value();
            if (e.length < this.options.minLength)
                return this.close(t);
            if (this._trigger("search", t) === !1)
                return;
            return this._search(e)
        },_search: function(e) {
            this.pending++, this.element.addClass("ui-autocomplete-loading"), this.cancelSearch = !1, this.source({term: e}, this._response())
        },_response: function() {
            var e = this, t = ++n;
            return function(r) {
                t === n && e.__response(r), e.pending--, e.pending || e.element.removeClass("ui-autocomplete-loading")
            }
        },__response: function(e) {
            e && (e = this._normalize(e)), this._trigger("response", null, {content: e}), !this.options.disabled && e && e.length && !this.cancelSearch ? (this._suggest(e), this._trigger("open")) : this._close()
        },close: function(e) {
            this.cancelSearch = !0, this._close(e)
        },_close: function(e) {
            this.menu.element.is(":visible") && (this.menu.element.hide(), this.menu.blur(), this.isNewMenu = !0, this._trigger("close", e))
        },_change: function(e) {
            this.previous !== this._value() && this._trigger("change", e, {item: this.selectedItem})
        },_normalize: function(t) {
            return t.length && t[0].label && t[0].value ? t : e.map(t, function(t) {
                return typeof t == "string" ? {label: t,value: t} : e.extend({label: t.label || t.value,value: t.value || t.label}, t)
            })
        },_suggest: function(t) {
            var n = this.menu.element.empty().zIndex(this.element.zIndex() + 1);
            this._renderMenu(n, t), this.menu.refresh(), n.show(), this._resizeMenu(), n.position(e.extend({of: this.element}, this.options.position)), this.options.autoFocus && this.menu.next()
        },_resizeMenu: function() {
            var e = this.menu.element;
            e.outerWidth(Math.max(e.width("").outerWidth() + 1, this.element.outerWidth()))
        },_renderMenu: function(t, n) {
            var r = this;
            e.each(n, function(e, n) {
                r._renderItemData(t, n)
            })
        },_renderItemData: function(e, t) {
            return this._renderItem(e, t).data("ui-autocomplete-item", t)
        },_renderItem: function(t, n) {
            return e("<li>").append(e("<a>").text(n.label)).appendTo(t)
        },_move: function(e, t) {
            if (!this.menu.element.is(":visible")) {
                this.search(null, t);
                return
            }
            if (this.menu.isFirstItem() && /^previous/.test(e) || this.menu.isLastItem() && /^next/.test(e)) {
                this._value(this.term), this.menu.blur();
                return
            }
            this.menu[e](t)
        },widget: function() {
            return this.menu.element
        },_value: function() {
            return this.valueMethod.apply(this.element, arguments)
        },_keyEvent: function(e, t) {
            if (!this.isMultiLine || this.menu.element.is(":visible"))
                this._move(e, t), t.preventDefault()
        }}), e.extend(e.ui.autocomplete, {escapeRegex: function(e) {
            return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")
        },filter: function(t, n) {
            var r = new RegExp(e.ui.autocomplete.escapeRegex(n), "i");
            return e.grep(t, function(e) {
                return r.test(e.label || e.value || e)
            })
        }}), e.widget("ui.autocomplete", e.ui.autocomplete, {options: {messages: {noResults: "No search results.",results: function(e) {
                    return e + (e > 1 ? " results are" : " result is") + " available, use up and down arrow keys to navigate."
                }}},__response: function(e) {
            var t;
            this._superApply(arguments);
            if (this.options.disabled || this.cancelSearch)
                return;
            e && e.length ? t = this.options.messages.results(e.length) : t = this.options.messages.noResults, this.liveRegion.text(t)
        }})
})(jQuery);
(function(e, t) {
    var n, r, i, s, o = "ui-button ui-widget ui-state-default ui-corner-all", u = "ui-state-hover ui-state-active ", a = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only", f = function() {
        var t = e(this).find(":ui-button");
        setTimeout(function() {
            t.button("refresh")
        }, 1)
    }, l = function(t) {
        var n = t.name, r = t.form, i = e([]);
        return n && (r ? i = e(r).find("[name='" + n + "']") : i = e("[name='" + n + "']", t.ownerDocument).filter(function() {
            return !this.form
        })), i
    };
    e.widget("ui.button", {version: "1.9.2",defaultElement: "<button>",options: {disabled: null,text: !0,label: null,icons: {primary: null,secondary: null}},_create: function() {
            this.element.closest("form").unbind("reset" + this.eventNamespace).bind("reset" + this.eventNamespace, f), typeof this.options.disabled != "boolean" ? this.options.disabled = !!this.element.prop("disabled") : this.element.prop("disabled", this.options.disabled), this._determineButtonType(), this.hasTitle = !!this.buttonElement.attr("title");
            var t = this, u = this.options, a = this.type === "checkbox" || this.type === "radio", c = a ? "" : "ui-state-active", h = "ui-state-focus";
            u.label === null && (u.label = this.type === "input" ? this.buttonElement.val() : this.buttonElement.html()), this._hoverable(this.buttonElement), this.buttonElement.addClass(o).attr("role", "button").bind("mouseenter" + this.eventNamespace, function() {
                if (u.disabled)
                    return;
                this === n && e(this).addClass("ui-state-active")
            }).bind("mouseleave" + this.eventNamespace, function() {
                if (u.disabled)
                    return;
                e(this).removeClass(c)
            }).bind("click" + this.eventNamespace, function(e) {
                u.disabled && (e.preventDefault(), e.stopImmediatePropagation())
            }), this.element.bind("focus" + this.eventNamespace, function() {
                t.buttonElement.addClass(h)
            }).bind("blur" + this.eventNamespace, function() {
                t.buttonElement.removeClass(h)
            }), a && (this.element.bind("change" + this.eventNamespace, function() {
                if (s)
                    return;
                t.refresh()
            }), this.buttonElement.bind("mousedown" + this.eventNamespace, function(e) {
                if (u.disabled)
                    return;
                s = !1, r = e.pageX, i = e.pageY
            }).bind("mouseup" + this.eventNamespace, function(e) {
                if (u.disabled)
                    return;
                if (r !== e.pageX || i !== e.pageY)
                    s = !0
            })), this.type === "checkbox" ? this.buttonElement.bind("click" + this.eventNamespace, function() {
                if (u.disabled || s)
                    return !1;
                e(this).toggleClass("ui-state-active"), t.buttonElement.attr("aria-pressed", t.element[0].checked)
            }) : this.type === "radio" ? this.buttonElement.bind("click" + this.eventNamespace, function() {
                if (u.disabled || s)
                    return !1;
                e(this).addClass("ui-state-active"), t.buttonElement.attr("aria-pressed", "true");
                var n = t.element[0];
                l(n).not(n).map(function() {
                    return e(this).button("widget")[0]
                }).removeClass("ui-state-active").attr("aria-pressed", "false")
            }) : (this.buttonElement.bind("mousedown" + this.eventNamespace, function() {
                if (u.disabled)
                    return !1;
                e(this).addClass("ui-state-active"), n = this, t.document.one("mouseup", function() {
                    n = null
                })
            }).bind("mouseup" + this.eventNamespace, function() {
                if (u.disabled)
                    return !1;
                e(this).removeClass("ui-state-active")
            }).bind("keydown" + this.eventNamespace, function(t) {
                if (u.disabled)
                    return !1;
                (t.keyCode === e.ui.keyCode.SPACE || t.keyCode === e.ui.keyCode.ENTER) && e(this).addClass("ui-state-active")
            }).bind("keyup" + this.eventNamespace, function() {
                e(this).removeClass("ui-state-active")
            }), this.buttonElement.is("a") && this.buttonElement.keyup(function(t) {
                t.keyCode === e.ui.keyCode.SPACE && e(this).click()
            })), this._setOption("disabled", u.disabled), this._resetButton()
        },_determineButtonType: function() {
            var e, t, n;
            this.element.is("[type=checkbox]") ? this.type = "checkbox" : this.element.is("[type=radio]") ? this.type = "radio" : this.element.is("input") ? this.type = "input" : this.type = "button", this.type === "checkbox" || this.type === "radio" ? (e = this.element.parents().last(), t = "label[for='" + this.element.attr("id") + "']", this.buttonElement = e.find(t), this.buttonElement.length || (e = e.length ? e.siblings() : this.element.siblings(), this.buttonElement = e.filter(t), this.buttonElement.length || (this.buttonElement = e.find(t))), this.element.addClass("ui-helper-hidden-accessible"), n = this.element.is(":checked"), n && this.buttonElement.addClass("ui-state-active"), this.buttonElement.prop("aria-pressed", n)) : this.buttonElement = this.element
        },widget: function() {
            return this.buttonElement
        },_destroy: function() {
            this.element.removeClass("ui-helper-hidden-accessible"), this.buttonElement.removeClass(o + " " + u + " " + a).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()), this.hasTitle || this.buttonElement.removeAttr("title")
        },_setOption: function(e, t) {
            this._super(e, t);
            if (e === "disabled") {
                t ? this.element.prop("disabled", !0) : this.element.prop("disabled", !1);
                return
            }
            this._resetButton()
        },refresh: function() {
            var t = this.element.is("input, button") ? this.element.is(":disabled") : this.element.hasClass("ui-button-disabled");
            t !== this.options.disabled && this._setOption("disabled", t), this.type === "radio" ? l(this.element[0]).each(function() {
                e(this).is(":checked") ? e(this).button("widget").addClass("ui-state-active").attr("aria-pressed", "true") : e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed", "false")
            }) : this.type === "checkbox" && (this.element.is(":checked") ? this.buttonElement.addClass("ui-state-active").attr("aria-pressed", "true") : this.buttonElement.removeClass("ui-state-active").attr("aria-pressed", "false"))
        },_resetButton: function() {
            if (this.type === "input") {
                this.options.label && this.element.val(this.options.label);
                return
            }
            var t = this.buttonElement.removeClass(a), n = e("<span></span>", this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(), r = this.options.icons, i = r.primary && r.secondary, s = [];
            r.primary || r.secondary ? (this.options.text && s.push("ui-button-text-icon" + (i ? "s" : r.primary ? "-primary" : "-secondary")), r.primary && t.prepend("<span class='ui-button-icon-primary ui-icon " + r.primary + "'></span>"), r.secondary && t.append("<span class='ui-button-icon-secondary ui-icon " + r.secondary + "'></span>"), this.options.text || (s.push(i ? "ui-button-icons-only" : "ui-button-icon-only"), this.hasTitle || t.attr("title", e.trim(n)))) : s.push("ui-button-text-only"), t.addClass(s.join(" "))
        }}), e.widget("ui.buttonset", {version: "1.9.2",options: {items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"},_create: function() {
            this.element.addClass("ui-buttonset")
        },_init: function() {
            this.refresh()
        },_setOption: function(e, t) {
            e === "disabled" && this.buttons.button("option", e, t), this._super(e, t)
        },refresh: function() {
            var t = this.element.css("direction") === "rtl";
            this.buttons = this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function() {
                return e(this).button("widget")[0]
            }).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t ? "ui-corner-right" : "ui-corner-left").end().filter(":last").addClass(t ? "ui-corner-left" : "ui-corner-right").end().end()
        },_destroy: function() {
            this.element.removeClass("ui-buttonset"), this.buttons.map(function() {
                return e(this).button("widget")[0]
            }).removeClass("ui-corner-left ui-corner-right").end().button("destroy")
        }})
})(jQuery);
(function(e, t) {
    var n = "ui-dialog ui-widget ui-widget-content ui-corner-all ", r = {buttons: !0,height: !0,maxHeight: !0,maxWidth: !0,minHeight: !0,minWidth: !0,width: !0}, i = {maxHeight: !0,maxWidth: !0,minHeight: !0,minWidth: !0};
    e.widget("ui.dialog", {version: "1.9.2",options: {autoOpen: !0,buttons: {},closeOnEscape: !0,closeText: "close",dialogClass: "",draggable: !0,hide: null,height: "auto",maxHeight: !1,maxWidth: !1,minHeight: 150,minWidth: 150,modal: !1,position: {my: "center",at: "center",of: window,collision: "fit",using: function(t) {
                    var n = e(this).css(t).offset().top;
                    n < 0 && e(this).css("top", t.top - n)
                }},resizable: !0,show: null,stack: !0,title: "",width: 300,zIndex: 1e3},_create: function() {
            this.originalTitle = this.element.attr("title"), typeof this.originalTitle != "string" && (this.originalTitle = ""), this.oldPosition = {parent: this.element.parent(),index: this.element.parent().children().index(this.element)}, this.options.title = this.options.title || this.originalTitle;
            var t = this, r = this.options, i = r.title || "&#160;", s, o, u, a, f;
            s = (this.uiDialog = e("<div>")).addClass(n + r.dialogClass).css({display: "none",outline: 0,zIndex: r.zIndex}).attr("tabIndex", -1).keydown(function(n) {
                r.closeOnEscape && !n.isDefaultPrevented() && n.keyCode && n.keyCode === e.ui.keyCode.ESCAPE && (t.close(n), n.preventDefault())
            }).mousedown(function(e) {
                t.moveToTop(!1, e)
            }).appendTo("body"), this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(s), o = (this.uiDialogTitlebar = e("<div>")).addClass("ui-dialog-titlebar  ui-widget-header  ui-corner-all  ui-helper-clearfix").bind("mousedown", function() {
                s.focus()
            }).prependTo(s), u = e("<a href='#'></a>").addClass("ui-dialog-titlebar-close  ui-corner-all").attr("role", "button").click(function(e) {
                e.preventDefault(), t.close(e)
            }).appendTo(o), (this.uiDialogTitlebarCloseText = e("<span>")).addClass("ui-icon ui-icon-closethick").text(r.closeText).appendTo(u), a = e("<span>").uniqueId().addClass("ui-dialog-title").html(i).prependTo(o), f = (this.uiDialogButtonPane = e("<div>")).addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"), (this.uiButtonSet = e("<div>")).addClass("ui-dialog-buttonset").appendTo(f), s.attr({role: "dialog","aria-labelledby": a.attr("id")}), o.find("*").add(o).disableSelection(), this._hoverable(u), this._focusable(u), r.draggable && e.fn.draggable && this._makeDraggable(), r.resizable && e.fn.resizable && this._makeResizable(), this._createButtons(r.buttons), this._isOpen = !1, e.fn.bgiframe && s.bgiframe(), this._on(s, {keydown: function(t) {
                    if (!r.modal || t.keyCode !== e.ui.keyCode.TAB)
                        return;
                    var n = e(":tabbable", s), i = n.filter(":first"), o = n.filter(":last");
                    if (t.target === o[0] && !t.shiftKey)
                        return i.focus(1), !1;
                    if (t.target === i[0] && t.shiftKey)
                        return o.focus(1), !1
                }})
        },_init: function() {
            this.options.autoOpen && this.open()
        },_destroy: function() {
            var e, t = this.oldPosition;
            this.overlay && this.overlay.destroy(), this.uiDialog.hide(), this.element.removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"), this.uiDialog.remove(), this.originalTitle && this.element.attr("title", this.originalTitle), e = t.parent.children().eq(t.index), e.length && e[0] !== this.element[0] ? e.before(this.element) : t.parent.append(this.element)
        },widget: function() {
            return this.uiDialog
        },close: function(t) {
            var n = this, r, i;
            if (!this._isOpen)
                return;
            if (!1 === this._trigger("beforeClose", t))
                return;
            return this._isOpen = !1, this.overlay && this.overlay.destroy(), this.options.hide ? this._hide(this.uiDialog, this.options.hide, function() {
                n._trigger("close", t)
            }) : (this.uiDialog.hide(), this._trigger("close", t)), e.ui.dialog.overlay.resize(), this.options.modal && (r = 0, e(".ui-dialog").each(function() {
                this !== n.uiDialog[0] && (i = e(this).css("z-index"), isNaN(i) || (r = Math.max(r, i)))
            }), e.ui.dialog.maxZ = r), this
        },isOpen: function() {
            return this._isOpen
        },moveToTop: function(t, n) {
            var r = this.options, i;
            return r.modal && !t || !r.stack && !r.modal ? this._trigger("focus", n) : (r.zIndex > e.ui.dialog.maxZ && (e.ui.dialog.maxZ = r.zIndex), this.overlay && (e.ui.dialog.maxZ += 1, e.ui.dialog.overlay.maxZ = e.ui.dialog.maxZ, this.overlay.$el.css("z-index", e.ui.dialog.overlay.maxZ)), i = {scrollTop: this.element.scrollTop(),scrollLeft: this.element.scrollLeft()}, e.ui.dialog.maxZ += 1, this.uiDialog.css("z-index", e.ui.dialog.maxZ), this.element.attr(i), this._trigger("focus", n), this)
        },open: function() {
            if (this._isOpen)
                return;
            var t, n = this.options, r = this.uiDialog;
            return this._size(), this._position(n.position), r.show(n.show), this.overlay = n.modal ? new e.ui.dialog.overlay(this) : null, this.moveToTop(!0), t = this.element.find(":tabbable"), t.length || (t = this.uiDialogButtonPane.find(":tabbable"), t.length || (t = r)), t.eq(0).focus(), this._isOpen = !0, this._trigger("open"), this
        },_createButtons: function(t) {
            var n = this, r = !1;
            this.uiDialogButtonPane.remove(), this.uiButtonSet.empty(), typeof t == "object" && t !== null && e.each(t, function() {
                return !(r = !0)
            }), r ? (e.each(t, function(t, r) {
                var i, s;
                r = e.isFunction(r) ? {click: r,text: t} : r, r = e.extend({type: "button"}, r), s = r.click, r.click = function() {
                    s.apply(n.element[0], arguments)
                }, i = e("<button></button>", r).appendTo(n.uiButtonSet), e.fn.button && i.button()
            }), this.uiDialog.addClass("ui-dialog-buttons"), this.uiDialogButtonPane.appendTo(this.uiDialog)) : this.uiDialog.removeClass("ui-dialog-buttons")
        },_makeDraggable: function() {
            function r(e) {
                return {position: e.position,offset: e.offset}
            }
            var t = this, n = this.options;
            this.uiDialog.draggable({cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",handle: ".ui-dialog-titlebar",containment: "document",start: function(n, i) {
                    e(this).addClass("ui-dialog-dragging"), t._trigger("dragStart", n, r(i))
                },drag: function(e, n) {
                    t._trigger("drag", e, r(n))
                },stop: function(i, s) {
                    n.position = [s.position.left - t.document.scrollLeft(), s.position.top - t.document.scrollTop()], e(this).removeClass("ui-dialog-dragging"), t._trigger("dragStop", i, r(s)), e.ui.dialog.overlay.resize()
                }})
        },_makeResizable: function(n) {
            function u(e) {
                return {originalPosition: e.originalPosition,originalSize: e.originalSize,position: e.position,size: e.size}
            }
            n = n === t ? this.options.resizable : n;
            var r = this, i = this.options, s = this.uiDialog.css("position"), o = typeof n == "string" ? n : "n,e,s,w,se,sw,ne,nw";
            this.uiDialog.resizable({cancel: ".ui-dialog-content",containment: "document",alsoResize: this.element,maxWidth: i.maxWidth,maxHeight: i.maxHeight,minWidth: i.minWidth,minHeight: this._minHeight(),handles: o,start: function(t, n) {
                    e(this).addClass("ui-dialog-resizing"), r._trigger("resizeStart", t, u(n))
                },resize: function(e, t) {
                    r._trigger("resize", e, u(t))
                },stop: function(t, n) {
                    e(this).removeClass("ui-dialog-resizing"), i.height = e(this).height(), i.width = e(this).width(), r._trigger("resizeStop", t, u(n)), e.ui.dialog.overlay.resize()
                }}).css("position", s).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")
        },_minHeight: function() {
            var e = this.options;
            return e.height === "auto" ? e.minHeight : Math.min(e.minHeight, e.height)
        },_position: function(t) {
            var n = [], r = [0, 0], i;
            if (t) {
                if (typeof t == "string" || typeof t == "object" && "0" in t)
                    n = t.split ? t.split(" ") : [t[0], t[1]], n.length === 1 && (n[1] = n[0]), e.each(["left", "top"], function(e, t) {
                        +n[e] === n[e] && (r[e] = n[e], n[e] = t)
                    }), t = {my: n[0] + (r[0] < 0 ? r[0] : "+" + r[0]) + " " + n[1] + (r[1] < 0 ? r[1] : "+" + r[1]),at: n.join(" ")};
                t = e.extend({}, e.ui.dialog.prototype.options.position, t)
            } else
                t = e.ui.dialog.prototype.options.position;
            i = this.uiDialog.is(":visible"), i || this.uiDialog.show(), this.uiDialog.position(t), i || this.uiDialog.hide()
        },_setOptions: function(t) {
            var n = this, s = {}, o = !1;
            e.each(t, function(e, t) {
                n._setOption(e, t), e in r && (o = !0), e in i && (s[e] = t)
            }), o && this._size(), this.uiDialog.is(":data(resizable)") && this.uiDialog.resizable("option", s)
        },_setOption: function(t, r) {
            var i, s, o = this.uiDialog;
            switch (t) {
                case "buttons":
                    this._createButtons(r);
                    break;
                case "closeText":
                    this.uiDialogTitlebarCloseText.text("" + r);
                    break;
                case "dialogClass":
                    o.removeClass(this.options.dialogClass).addClass(n + r);
                    break;
                case "disabled":
                    r ? o.addClass("ui-dialog-disabled") : o.removeClass("ui-dialog-disabled");
                    break;
                case "draggable":
                    i = o.is(":data(draggable)"), i && !r && o.draggable("destroy"), !i && r && this._makeDraggable();
                    break;
                case "position":
                    this._position(r);
                    break;
                case "resizable":
                    s = o.is(":data(resizable)"), s && !r && o.resizable("destroy"), s && typeof r == "string" && o.resizable("option", "handles", r), !s && r !== !1 && this._makeResizable(r);
                    break;
                case "title":
                    e(".ui-dialog-title", this.uiDialogTitlebar).html("" + (r || "&#160;"))
            }
            this._super(t, r)
        },_size: function() {
            var t, n, r, i = this.options, s = this.uiDialog.is(":visible");
            this.element.show().css({width: "auto",minHeight: 0,height: 0}), i.minWidth > i.width && (i.width = i.minWidth), t = this.uiDialog.css({height: "auto",width: i.width}).outerHeight(), n = Math.max(0, i.minHeight - t), i.height === "auto" ? e.support.minHeight ? this.element.css({minHeight: n,height: "auto"}) : (this.uiDialog.show(), r = this.element.css("height", "auto").height(), s || this.uiDialog.hide(), this.element.height(Math.max(r, n))) : this.element.height(Math.max(i.height - t, 0)), this.uiDialog.is(":data(resizable)") && this.uiDialog.resizable("option", "minHeight", this._minHeight())
        }}), e.extend(e.ui.dialog, {uuid: 0,maxZ: 0,getTitleId: function(e) {
            var t = e.attr("id");
            return t || (this.uuid += 1, t = this.uuid), "ui-dialog-title-" + t
        },overlay: function(t) {
            this.$el = e.ui.dialog.overlay.create(t)
        }}), e.extend(e.ui.dialog.overlay, {instances: [],oldInstances: [],maxZ: 0,events: e.map("focus,mousedown,mouseup,keydown,keypress,click".split(","), function(e) {
            return e + ".dialog-overlay"
        }).join(" "),create: function(t) {
            this.instances.length === 0 && (setTimeout(function() {
                e.ui.dialog.overlay.instances.length && e(document).bind(e.ui.dialog.overlay.events, function(t) {
                    if (e(t.target).zIndex() < e.ui.dialog.overlay.maxZ)
                        return !1
                })
            }, 1), e(window).bind("resize.dialog-overlay", e.ui.dialog.overlay.resize));
            var n = this.oldInstances.pop() || e("<div>").addClass("ui-widget-overlay");
            return e(document).bind("keydown.dialog-overlay", function(r) {
                var i = e.ui.dialog.overlay.instances;
                i.length !== 0 && i[i.length - 1] === n && t.options.closeOnEscape && !r.isDefaultPrevented() && r.keyCode && r.keyCode === e.ui.keyCode.ESCAPE && (t.close(r), r.preventDefault())
            }), n.appendTo(document.body).css({width: this.width(),height: this.height()}), e.fn.bgiframe && n.bgiframe(), this.instances.push(n), n
        },destroy: function(t) {
            var n = e.inArray(t, this.instances), r = 0;
            n !== -1 && this.oldInstances.push(this.instances.splice(n, 1)[0]), this.instances.length === 0 && e([document, window]).unbind(".dialog-overlay"), t.height(0).width(0).remove(), e.each(this.instances, function() {
                r = Math.max(r, this.css("z-index"))
            }), this.maxZ = r
        },height: function() {
            var t, n;
            return e.ui.ie ? (t = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight), n = Math.max(document.documentElement.offsetHeight, document.body.offsetHeight), t < n ? e(window).height() + "px" : t + "px") : e(document).height() + "px"
        },width: function() {
            var t, n;
            return e.ui.ie ? (t = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth), n = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth), t < n ? e(window).width() + "px" : t + "px") : e(document).width() + "px"
        },resize: function() {
            var t = e([]);
            e.each(e.ui.dialog.overlay.instances, function() {
                t = t.add(this)
            }), t.css({width: 0,height: 0}).css({width: e.ui.dialog.overlay.width(),height: e.ui.dialog.overlay.height()})
        }}), e.extend(e.ui.dialog.overlay.prototype, {destroy: function() {
            e.ui.dialog.overlay.destroy(this.$el)
        }})
})(jQuery);
(function(e, t) {
    var n = !1;
    e.widget("ui.menu", {version: "1.9.2",defaultElement: "<ul>",delay: 300,options: {icons: {submenu: "ui-icon-carat-1-e"},menus: "ul",position: {my: "left top",at: "right top"},role: "menu",blur: null,focus: null,select: null},_create: function() {
            this.activeMenu = this.element, this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons", !!this.element.find(".ui-icon").length).attr({role: this.options.role,tabIndex: 0}).bind("click" + this.eventNamespace, e.proxy(function(e) {
                this.options.disabled && e.preventDefault()
            }, this)), this.options.disabled && this.element.addClass("ui-state-disabled").attr("aria-disabled", "true"), this._on({"mousedown .ui-menu-item > a": function(e) {
                    e.preventDefault()
                },"click .ui-state-disabled > a": function(e) {
                    e.preventDefault()
                },"click .ui-menu-item:has(a)": function(t) {
                    var r = e(t.target).closest(".ui-menu-item");
                    !n && r.not(".ui-state-disabled").length && (n = !0, this.select(t), r.has(".ui-menu").length ? this.expand(t) : this.element.is(":focus") || (this.element.trigger("focus", [!0]), this.active && this.active.parents(".ui-menu").length === 1 && clearTimeout(this.timer)))
                },"mouseenter .ui-menu-item": function(t) {
                    var n = e(t.currentTarget);
                    n.siblings().children(".ui-state-active").removeClass("ui-state-active"), this.focus(t, n)
                },mouseleave: "collapseAll","mouseleave .ui-menu": "collapseAll",focus: function(e, t) {
                    var n = this.active || this.element.children(".ui-menu-item").eq(0);
                    t || this.focus(e, n)
                },blur: function(t) {
                    this._delay(function() {
                        e.contains(this.element[0], this.document[0].activeElement) || this.collapseAll(t)
                    })
                },keydown: "_keydown"}), this.refresh(), this._on(this.document, {click: function(t) {
                    e(t.target).closest(".ui-menu").length || this.collapseAll(t), n = !1
                }})
        },_destroy: function() {
            this.element.removeAttr("aria-activedescendant").find(".ui-menu").andSelf().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(), this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function() {
                var t = e(this);
                t.data("ui-menu-submenu-carat") && t.remove()
            }), this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")
        },_keydown: function(t) {
            function a(e) {
                return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&")
            }
            var n, r, i, s, o, u = !0;
            switch (t.keyCode) {
                case e.ui.keyCode.PAGE_UP:
                    this.previousPage(t);
                    break;
                case e.ui.keyCode.PAGE_DOWN:
                    this.nextPage(t);
                    break;
                case e.ui.keyCode.HOME:
                    this._move("first", "first", t);
                    break;
                case e.ui.keyCode.END:
                    this._move("last", "last", t);
                    break;
                case e.ui.keyCode.UP:
                    this.previous(t);
                    break;
                case e.ui.keyCode.DOWN:
                    this.next(t);
                    break;
                case e.ui.keyCode.LEFT:
                    this.collapse(t);
                    break;
                case e.ui.keyCode.RIGHT:
                    this.active && !this.active.is(".ui-state-disabled") && this.expand(t);
                    break;
                case e.ui.keyCode.ENTER:
                case e.ui.keyCode.SPACE:
                    this._activate(t);
                    break;
                case e.ui.keyCode.ESCAPE:
                    this.collapse(t);
                    break;
                default:
                    u = !1, r = this.previousFilter || "", i = String.fromCharCode(t.keyCode), s = !1, clearTimeout(this.filterTimer), i === r ? s = !0 : i = r + i, o = new RegExp("^" + a(i), "i"), n = this.activeMenu.children(".ui-menu-item").filter(function() {
                        return o.test(e(this).children("a").text())
                    }), n = s && n.index(this.active.next()) !== -1 ? this.active.nextAll(".ui-menu-item") : n, n.length || (i = String.fromCharCode(t.keyCode), o = new RegExp("^" + a(i), "i"), n = this.activeMenu.children(".ui-menu-item").filter(function() {
                        return o.test(e(this).children("a").text())
                    })), n.length ? (this.focus(t, n), n.length > 1 ? (this.previousFilter = i, this.filterTimer = this._delay(function() {
                        delete this.previousFilter
                    }, 1e3)) : delete this.previousFilter) : delete this.previousFilter
            }
            u && t.preventDefault()
        },_activate: function(e) {
            this.active.is(".ui-state-disabled") || (this.active.children("a[aria-haspopup='true']").length ? this.expand(e) : this.select(e))
        },refresh: function() {
            var t, n = this.options.icons.submenu, r = this.element.find(this.options.menus);
            r.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role: this.options.role,"aria-hidden": "true","aria-expanded": "false"}).each(function() {
                var t = e(this), r = t.prev("a"), i = e("<span>").addClass("ui-menu-icon ui-icon " + n).data("ui-menu-submenu-carat", !0);
                r.attr("aria-haspopup", "true").prepend(i), t.attr("aria-labelledby", r.attr("id"))
            }), t = r.add(this.element), t.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role", "presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex: -1,role: this._itemRole()}), t.children(":not(.ui-menu-item)").each(function() {
                var t = e(this);
                /[^\-—–\s]/.test(t.text()) || t.addClass("ui-widget-content ui-menu-divider")
            }), t.children(".ui-state-disabled").attr("aria-disabled", "true"), this.active && !e.contains(this.element[0], this.active[0]) && this.blur()
        },_itemRole: function() {
            return {menu: "menuitem",listbox: "option"}[this.options.role]
        },focus: function(e, t) {
            var n, r;
            this.blur(e, e && e.type === "focus"), this._scrollIntoView(t), this.active = t.first(), r = this.active.children("a").addClass("ui-state-focus"), this.options.role && this.element.attr("aria-activedescendant", r.attr("id")), this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"), e && e.type === "keydown" ? this._close() : this.timer = this._delay(function() {
                this._close()
            }, this.delay), n = t.children(".ui-menu"), n.length && /^mouse/.test(e.type) && this._startOpening(n), this.activeMenu = t.parent(), this._trigger("focus", e, {item: t})
        },_scrollIntoView: function(t) {
            var n, r, i, s, o, u;
            this._hasScroll() && (n = parseFloat(e.css(this.activeMenu[0], "borderTopWidth")) || 0, r = parseFloat(e.css(this.activeMenu[0], "paddingTop")) || 0, i = t.offset().top - this.activeMenu.offset().top - n - r, s = this.activeMenu.scrollTop(), o = this.activeMenu.height(), u = t.height(), i < 0 ? this.activeMenu.scrollTop(s + i) : i + u > o && this.activeMenu.scrollTop(s + i - o + u))
        },blur: function(e, t) {
            t || clearTimeout(this.timer);
            if (!this.active)
                return;
            this.active.children("a").removeClass("ui-state-focus"), this.active = null, this._trigger("blur", e, {item: this.active})
        },_startOpening: function(e) {
            clearTimeout(this.timer);
            if (e.attr("aria-hidden") !== "true")
                return;
            this.timer = this._delay(function() {
                this._close(), this._open(e)
            }, this.delay)
        },_open: function(t) {
            var n = e.extend({of: this.active}, this.options.position);
            clearTimeout(this.timer), this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden", "true"), t.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(n)
        },collapseAll: function(t, n) {
            clearTimeout(this.timer), this.timer = this._delay(function() {
                var r = n ? this.element : e(t && t.target).closest(this.element.find(".ui-menu"));
                r.length || (r = this.element), this._close(r), this.blur(t), this.activeMenu = r
            }, this.delay)
        },_close: function(e) {
            e || (e = this.active ? this.active.parent() : this.element), e.find(".ui-menu").hide().attr("aria-hidden", "true").attr("aria-expanded", "false").end().find("a.ui-state-active").removeClass("ui-state-active")
        },collapse: function(e) {
            var t = this.active && this.active.parent().closest(".ui-menu-item", this.element);
            t && t.length && (this._close(), this.focus(e, t))
        },expand: function(e) {
            var t = this.active && this.active.children(".ui-menu ").children(".ui-menu-item").first();
            t && t.length && (this._open(t.parent()), this._delay(function() {
                this.focus(e, t)
            }))
        },next: function(e) {
            this._move("next", "first", e)
        },previous: function(e) {
            this._move("prev", "last", e)
        },isFirstItem: function() {
            return this.active && !this.active.prevAll(".ui-menu-item").length
        },isLastItem: function() {
            return this.active && !this.active.nextAll(".ui-menu-item").length
        },_move: function(e, t, n) {
            var r;
            this.active && (e === "first" || e === "last" ? r = this.active[e === "first" ? "prevAll" : "nextAll"](".ui-menu-item").eq(-1) : r = this.active[e + "All"](".ui-menu-item").eq(0));
            if (!r || !r.length || !this.active)
                r = this.activeMenu.children(".ui-menu-item")[t]();
            this.focus(n, r)
        },nextPage: function(t) {
            var n, r, i;
            if (!this.active) {
                this.next(t);
                return
            }
            if (this.isLastItem())
                return;
            this._hasScroll() ? (r = this.active.offset().top, i = this.element.height(), this.active.nextAll(".ui-menu-item").each(function() {
                return n = e(this), n.offset().top - r - i < 0
            }), this.focus(t, n)) : this.focus(t, this.activeMenu.children(".ui-menu-item")[this.active ? "last" : "first"]())
        },previousPage: function(t) {
            var n, r, i;
            if (!this.active) {
                this.next(t);
                return
            }
            if (this.isFirstItem())
                return;
            this._hasScroll() ? (r = this.active.offset().top, i = this.element.height(), this.active.prevAll(".ui-menu-item").each(function() {
                return n = e(this), n.offset().top - r + i > 0
            }), this.focus(t, n)) : this.focus(t, this.activeMenu.children(".ui-menu-item").first())
        },_hasScroll: function() {
            return this.element.outerHeight() < this.element.prop("scrollHeight")
        },select: function(t) {
            this.active = this.active || e(t.target).closest(".ui-menu-item");
            var n = {item: this.active};
            this.active.has(".ui-menu").length || this.collapseAll(t, !0), this._trigger("select", t, n)
        }})
})(jQuery);

/**************************************************************************************



/common/js/lib/jquery/jquery.mobile.custom.min.js



**************************************************************************************/
/*! jQuery Mobile v1.2.0 jquerymobile.com | jquery.org/license */
(function(a, b, c) {
    typeof define == "function" && define.amd ? define(["jquery"], function(d) {
        return c(d, a, b), d.mobile
    }) : c(a.jQuery, a, b)
})(this, document, function(a, b, c, d) {
    (function(a) {
        a.event.special.throttledresize = {setup: function() {
                a(this).bind("resize", c)
            },teardown: function() {
                a(this).unbind("resize", c)
            }};
        var b = 250, c = function() {
            f = (new Date).getTime(), g = f - d, g >= b ? (d = f, a(this).trigger("throttledresize")) : (e && clearTimeout(e), e = setTimeout(c, b - g))
        }, d = 0, e, f, g
    })(a), function(a, c) {
        a.extend(a.support, {orientation: "orientation" in b && "onorientationchange" in b})
    }(a), function(a, b) {
        function o() {
            var a = g();
            a !== h && (h = a, d.trigger(e))
        }
        var d = a(b), e = "orientationchange", f, g, h, i, j, k = {0: !0,180: !0};
        if (a.support.orientation) {
            var l = b.innerWidth || a(b).width(), m = b.innerHeight || a(b).height(), n = 50;
            i = l > m && l - m > n, j = k[b.orientation];
            if (i && j || !i && !j)
                k = {"-90": !0,90: !0}
        }
        a.event.special.orientationchange = a.extend({}, a.event.special.orientationchange, {setup: function() {
                if (a.support.orientation && !a.event.special.orientationchange.disabled)
                    return !1;
                h = g(), d.bind("throttledresize", o)
            },teardown: function() {
                if (a.support.orientation && !a.event.special.orientationchange.disabled)
                    return !1;
                d.unbind("throttledresize", o)
            },add: function(a) {
                var b = a.handler;
                a.handler = function(a) {
                    return a.orientation = g(), b.apply(this, arguments)
                }
            }}), a.event.special.orientationchange.orientation = g = function() {
            var d = !0, e = c.documentElement;
            return a.support.orientation ? d = k[b.orientation] : d = e && e.clientWidth / e.clientHeight < 1.1, d ? "portrait" : "landscape"
        }, a.fn[e] = function(a) {
            return a ? this.bind(e, a) : this.trigger(e)
        }, a.attrFn && (a.attrFn[e] = !0)
    }(a, this), function(a, b) {
        var d = {touch: "ontouchend" in c};
        a.mobile = a.mobile || {}, a.mobile.support = a.mobile.support || {}, a.extend(a.support, d), a.extend(a.mobile.support, d)
    }(a), function(a, b, c, d) {
        function x(a) {
            while (a && typeof a.originalEvent != "undefined")
                a = a.originalEvent;
            return a
        }
        function y(b, c) {
            var e = b.type, f, g, i, k, l, m, n, o, p;
            b = a.Event(b), b.type = c, f = b.originalEvent, g = a.event.props, e.search(/^(mouse|click)/) > -1 && (g = j);
            if (f)
                for (n = g.length, k; n; )
                    k = g[--n], b[k] = f[k];
            e.search(/mouse(down|up)|click/) > -1 && !b.which && (b.which = 1);
            if (e.search(/^touch/) !== -1) {
                i = x(f), e = i.touches, l = i.changedTouches, m = e && e.length ? e[0] : l && l.length ? l[0] : d;
                if (m)
                    for (o = 0, p = h.length; o < p; o++)
                        k = h[o], b[k] = m[k]
            }
            return b
        }
        function z(b) {
            var c = {}, d, f;
            while (b) {
                d = a.data(b, e);
                for (f in d)
                    d[f] && (c[f] = c.hasVirtualBinding = !0);
                b = b.parentNode
            }
            return c
        }
        function A(b, c) {
            var d;
            while (b) {
                d = a.data(b, e);
                if (d && (!c || d[c]))
                    return b;
                b = b.parentNode
            }
            return null
        }
        function B() {
            r = !1
        }
        function C() {
            r = !0
        }
        function D() {
            v = 0, p.length = 0, q = !1, C()
        }
        function E() {
            B()
        }
        function F() {
            G(), l = setTimeout(function() {
                l = 0, D()
            }, a.vmouse.resetTimerDuration)
        }
        function G() {
            l && (clearTimeout(l), l = 0)
        }
        function H(b, c, d) {
            var e;
            if (d && d[b] || !d && A(c.target, b))
                e = y(c, b), a(c.target).trigger(e);
            return e
        }
        function I(b) {
            var c = a.data(b.target, f);
            if (!q && (!v || v !== c)) {
                var d = H("v" + b.type, b);
                d && (d.isDefaultPrevented() && b.preventDefault(), d.isPropagationStopped() && b.stopPropagation(), d.isImmediatePropagationStopped() && b.stopImmediatePropagation())
            }
        }
        function J(b) {
            var c = x(b).touches, d, e;
            if (c && c.length === 1) {
                d = b.target, e = z(d);
                if (e.hasVirtualBinding) {
                    v = u++, a.data(d, f, v), G(), E(), o = !1;
                    var g = x(b).touches[0];
                    m = g.pageX, n = g.pageY, H("vmouseover", b, e), H("vmousedown", b, e)
                }
            }
        }
        function K(a) {
            if (r)
                return;
            o || H("vmousecancel", a, z(a.target)), o = !0, F()
        }
        function L(b) {
            if (r)
                return;
            var c = x(b).touches[0], d = o, e = a.vmouse.moveDistanceThreshold, f = z(b.target);
            o = o || Math.abs(c.pageX - m) > e || Math.abs(c.pageY - n) > e, o && !d && H("vmousecancel", b, f), H("vmousemove", b, f), F()
        }
        function M(a) {
            if (r)
                return;
            C();
            var b = z(a.target), c;
            H("vmouseup", a, b);
            if (!o) {
                var d = H("vclick", a, b);
                d && d.isDefaultPrevented() && (c = x(a).changedTouches[0], p.push({touchID: v,x: c.clientX,y: c.clientY}), q = !0)
            }
            H("vmouseout", a, b), o = !1, F()
        }
        function N(b) {
            var c = a.data(b, e), d;
            if (c)
                for (d in c)
                    if (c[d])
                        return !0;
            return !1
        }
        function O() {
        }
        function P(b) {
            var c = b.substr(1);
            return {setup: function(d, f) {
                    N(this) || a.data(this, e, {});
                    var g = a.data(this, e);
                    g[b] = !0, k[b] = (k[b] || 0) + 1, k[b] === 1 && t.bind(c, I), a(this).bind(c, O), s && (k.touchstart = (k.touchstart || 0) + 1, k.touchstart === 1 && t.bind("touchstart", J).bind("touchend", M).bind("touchmove", L).bind("scroll", K))
                },teardown: function(d, f) {
                    --k[b], k[b] || t.unbind(c, I), s && (--k.touchstart, k.touchstart || t.unbind("touchstart", J).unbind("touchmove", L).unbind("touchend", M).unbind("scroll", K));
                    var g = a(this), h = a.data(this, e);
                    h && (h[b] = !1), g.unbind(c, O), N(this) || g.removeData(e)
                }}
        }
        var e = "virtualMouseBindings", f = "virtualTouchID", g = "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "), h = "clientX clientY pageX pageY screenX screenY".split(" "), i = a.event.mouseHooks ? a.event.mouseHooks.props : [], j = a.event.props.concat(i), k = {}, l = 0, m = 0, n = 0, o = !1, p = [], q = !1, r = !1, s = "addEventListener" in c, t = a(c), u = 1, v = 0, w;
        a.vmouse = {moveDistanceThreshold: 10,clickDistanceThreshold: 10,resetTimerDuration: 1500};
        for (var Q = 0; Q < g.length; Q++)
            a.event.special[g[Q]] = P(g[Q]);
        s && c.addEventListener("click", function(b) {
            var c = p.length, d = b.target, e, g, h, i, j, k;
            if (c) {
                e = b.clientX, g = b.clientY, w = a.vmouse.clickDistanceThreshold, h = d;
                while (h) {
                    for (i = 0; i < c; i++) {
                        j = p[i], k = 0;
                        if (h === d && Math.abs(j.x - e) < w && Math.abs(j.y - g) < w || a.data(h, f) === j.touchID) {
                            b.preventDefault(), b.stopPropagation();
                            return
                        }
                    }
                    h = h.parentNode
                }
            }
        }, !0)
    }(a, b, c), function(a, b, d) {
        function j(b, c, d) {
            var e = d.type;
            d.type = c, a.event.handle.call(b, d), d.type = e
        }
        a.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "), function(b, c) {
            a.fn[c] = function(a) {
                return a ? this.bind(c, a) : this.trigger(c)
            }, a.attrFn && (a.attrFn[c] = !0)
        });
        var e = a.mobile.support.touch, f = "touchmove scroll", g = e ? "touchstart" : "mousedown", h = e ? "touchend" : "mouseup", i = e ? "touchmove" : "mousemove";
        a.event.special.scrollstart = {enabled: !0,setup: function() {
                function g(a, c) {
                    d = c, j(b, d ? "scrollstart" : "scrollstop", a)
                }
                var b = this, c = a(b), d, e;
                c.bind(f, function(b) {
                    if (!a.event.special.scrollstart.enabled)
                        return;
                    d || g(b, !0), clearTimeout(e), e = setTimeout(function() {
                        g(b, !1)
                    }, 50)
                })
            }}, a.event.special.tap = {tapholdThreshold: 750,setup: function() {
                var b = this, d = a(b);
                d.bind("vmousedown", function(e) {
                    function i() {
                        clearTimeout(h)
                    }
                    function k() {
                        i(), d.unbind("vclick", l).unbind("vmouseup", i), a(c).unbind("vmousecancel", k)
                    }
                    function l(a) {
                        k(), f === a.target && j(b, "tap", a)
                    }
                    if (e.which && e.which !== 1)
                        return !1;
                    var f = e.target, g = e.originalEvent, h;
                    d.bind("vmouseup", i).bind("vclick", l), a(c).bind("vmousecancel", k), h = setTimeout(function() {
                        j(b, "taphold", a.Event("taphold", {target: f}))
                    }, a.event.special.tap.tapholdThreshold)
                })
            }}, a.event.special.swipe = {scrollSupressionThreshold: 30,durationThreshold: 1e3,horizontalDistanceThreshold: 30,verticalDistanceThreshold: 75,setup: function() {
                var b = this, c = a(b);
                c.bind(g, function(b) {
                    function j(b) {
                        if (!f)
                            return;
                        var c = b.originalEvent.touches ? b.originalEvent.touches[0] : b;
                        g = {time: (new Date).getTime(),coords: [c.pageX, c.pageY]}, Math.abs(f.coords[0] - g.coords[0]) > a.event.special.swipe.scrollSupressionThreshold && b.preventDefault()
                    }
                    var e = b.originalEvent.touches ? b.originalEvent.touches[0] : b, f = {time: (new Date).getTime(),coords: [e.pageX, e.pageY],origin: a(b.target)}, g;
                    c.bind(i, j).one(h, function(b) {
                        c.unbind(i, j), f && g && g.time - f.time < a.event.special.swipe.durationThreshold && Math.abs(f.coords[0] - g.coords[0]) > a.event.special.swipe.horizontalDistanceThreshold && Math.abs(f.coords[1] - g.coords[1]) < a.event.special.swipe.verticalDistanceThreshold && f.origin.trigger("swipe").trigger(f.coords[0] > g.coords[0] ? "swipeleft" : "swiperight"), f = g = d
                    })
                })
            }}, a.each({scrollstop: "scrollstart",taphold: "tap",swipeleft: "swipe",swiperight: "swipe"}, function(b, c) {
            a.event.special[b] = {setup: function() {
                    a(this).bind(c, a.noop)
                }}
        })
    }(a, this)
});

/**************************************************************************************



/common/js/lib/jquery/spin.min.js



**************************************************************************************/
!function(t, e, i) {
    var o = ["webkit", "Moz", "ms", "O"], r = {}, n;
    function a(t, i) {
        var o = e.createElement(t || "div"), r;
        for (r in i)
            o[r] = i[r];
        return o
    }
    function s(t) {
        for (var e = 1, i = arguments.length; e < i; e++)
            t.appendChild(arguments[e]);
        return t
    }
    var f = function() {
        var t = a("style", {type: "text/css"});
        s(e.getElementsByTagName("head")[0], t);
        return t.sheet || t.styleSheet
    }();
    function l(t, e, i, o) {
        var a = ["opacity", e, ~~(t * 100), i, o].join("-"), s = .01 + i / o * 100, l = Math.max(1 - (1 - t) / e * (100 - s), t), p = n.substring(0, n.indexOf("Animation")).toLowerCase(), u = p && "-" + p + "-" || "";
        if (!r[a]) {
            f.insertRule("@" + u + "keyframes " + a + "{" + "0%{opacity:" + l + "}" + s + "%{opacity:" + t + "}" + (s + .01) + "%{opacity:1}" + (s + e) % 100 + "%{opacity:" + t + "}" + "100%{opacity:" + l + "}" + "}", f.cssRules.length);
            r[a] = 1
        }
        return a
    }
    function p(t, e) {
        var r = t.style, n, a;
        if (r[e] !== i)
            return e;
        e = e.charAt(0).toUpperCase() + e.slice(1);
        for (a = 0; a < o.length; a++) {
            n = o[a] + e;
            if (r[n] !== i)
                return n
        }
    }
    function u(t, e) {
        for (var i in e)
            t.style[p(t, i) || i] = e[i];
        return t
    }
    function c(t) {
        for (var e = 1; e < arguments.length; e++) {
            var o = arguments[e];
            for (var r in o)
                if (t[r] === i)
                    t[r] = o[r]
        }
        return t
    }
    function d(t) {
        var e = {x: t.offsetLeft,y: t.offsetTop};
        while (t = t.offsetParent)
            e.x += t.offsetLeft, e.y += t.offsetTop;
        return e
    }
    var h = {lines: 12,length: 7,width: 5,radius: 10,rotate: 0,corners: 1,color: "#000",speed: 1,trail: 100,opacity: 1 / 4,fps: 20,zIndex: 2e9,className: "spinner",top: "auto",left: "auto",position: "relative"};
    function m(t) {
        if (!this.spin)
            return new m(t);
        this.opts = c(t || {}, m.defaults, h)
    }
    m.defaults = {};
    c(m.prototype, {spin: function(t) {
            this.stop();
            var e = this, i = e.opts, o = e.el = u(a(0, {className: i.className}), {position: i.position,width: 0,zIndex: i.zIndex}), r = i.radius + i.length + i.width, s, f;
            if (t) {
                t.insertBefore(o, t.firstChild || null);
                f = d(t);
                s = d(o);
                u(o, {left: (i.left == "auto" ? f.x - s.x + (t.offsetWidth >> 1) : parseInt(i.left, 10) + r) + "px",top: (i.top == "auto" ? f.y - s.y + (t.offsetHeight >> 1) : parseInt(i.top, 10) + r) + "px"})
            }
            o.setAttribute("aria-role", "progressbar");
            e.lines(o, e.opts);
            if (!n) {
                var l = 0, p = i.fps, c = p / i.speed, h = (1 - i.opacity) / (c * i.trail / 100), m = c / i.lines;
                (function y() {
                    l++;
                    for (var t = i.lines; t; t--) {
                        var r = Math.max(1 - (l + t * m) % c * h, i.opacity);
                        e.opacity(o, i.lines - t, r, i)
                    }
                    e.timeout = e.el && setTimeout(y, ~~(1e3 / p))
                })()
            }
            return e
        },stop: function() {
            var t = this.el;
            if (t) {
                clearTimeout(this.timeout);
                if (t.parentNode)
                    t.parentNode.removeChild(t);
                this.el = i
            }
            return this
        },lines: function(t, e) {
            var i = 0, o;
            function r(t, o) {
                return u(a(), {position: "absolute",width: e.length + e.width + "px",height: e.width + "px",background: t,boxShadow: o,transformOrigin: "left",transform: "rotate(" + ~~(360 / e.lines * i + e.rotate) + "deg) translate(" + e.radius + "px" + ",0)",borderRadius: (e.corners * e.width >> 1) + "px"})
            }
            for (; i < e.lines; i++) {
                o = u(a(), {position: "absolute",top: 1 + ~(e.width / 2) + "px",transform: e.hwaccel ? "translate3d(0,0,0)" : "",opacity: e.opacity,animation: n && l(e.opacity, e.trail, i, e.lines) + " " + 1 / e.speed + "s linear infinite"});
                if (e.shadow)
                    s(o, u(r("#000", "0 0 4px " + "#000"), {top: 2 + "px"}));
                s(t, s(o, r(e.color, "0 0 1px rgba(0,0,0,.1)")))
            }
            return t
        },opacity: function(t, e, i) {
            if (e < t.childNodes.length)
                t.childNodes[e].style.opacity = i
        }});
    (function() {
        function t(t, e) {
            return a("<" + t + ' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">', e)
        }
        var e = u(a("group"), {behavior: "url(#default#VML)"});
        if (!p(e, "transform") && e.adj) {
            f.addRule(".spin-vml", "behavior:url(#default#VML)");
            m.prototype.lines = function(e, i) {
                var o = i.length + i.width, r = 2 * o;
                function n() {
                    return u(t("group", {coordsize: r + " " + r,coordorigin: -o + " " + -o}), {width: r,height: r})
                }
                var a = -(i.width + i.length) * 2 + "px", f = u(n(), {position: "absolute",top: a,left: a}), l;
                function p(e, r, a) {
                    s(f, s(u(n(), {rotation: 360 / i.lines * e + "deg",left: ~~r}), s(u(t("roundrect", {arcsize: i.corners}), {width: o,height: i.width,left: i.radius,top: -i.width >> 1,filter: a}), t("fill", {color: i.color,opacity: i.opacity}), t("stroke", {opacity: 0}))))
                }
                if (i.shadow)
                    for (l = 1; l <= i.lines; l++)
                        p(l, -2, "progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");
                for (l = 1; l <= i.lines; l++)
                    p(l);
                return s(e, f)
            };
            m.prototype.opacity = function(t, e, i, o) {
                var r = t.firstChild;
                o = o.shadow && o.lines || 0;
                if (r && e + o < r.childNodes.length) {
                    r = r.childNodes[e + o];
                    r = r && r.firstChild;
                    r = r && r.firstChild;
                    if (r)
                        r.opacity = i
                }
            }
        } else
            n = p(e, "animation")
    })();
    if (typeof define == "function" && define.amd)
        define(function() {
            return m
        });
    else
        t.Spinner = m
}(window, document);

/**************************************************************************************



/mobile/common/js/global/spinner.js



**************************************************************************************/
$(document).ready(function() {
    
    var spinnerOpts = {
        lines: 11, // The number of lines to draw
        length: 5, // The length of each line
        width: 4, // The line thickness
        radius: 8, // The radius of the inner circle
        corners: 1, // Corner roundness (0..1)
        rotate: 0, // The rotation offset
        color: '#fff', // #rgb or #rrggbb
        speed: 1.1, // Rounds per second
        trail: 42, // Afterglow percentage
        shadow: false, // Whether to render a shadow
        hwaccel: false, // Whether to use hardware acceleration
        className: 'spinner', // The CSS class to assign to the spinner
        zIndex: 2e9, // The z-index (defaults to 2000000000)
        top: 'auto', // Top position relative to parent in px
        left: 'auto' // Left position relative to parent in px
    };
    
    $.fn.spin = function(color) {
        
        this.each(function() {
            var $this = $(this), 
            data = $this.data();
            
            if (data.spinner) {
                data.spinner.stop();
                delete data.spinner;
            }
            
            if (spinnerOpts !== false) {
                spinnerOpts.color = color;
                data.spinner = new Spinner($.extend({color: $this.css('color')}, spinnerOpts)).spin(this);
            }
        });
        return this;
    };

    /* showLoadingIcon - displays JS spinner for photoswipe instances
  	 * @param color - the color of the spinner
  	 * @param ps - our attached photoswipe instance 
  	 * @param _PS - our Photoswipe object
  	 * @param element - the DOM element where we wish to place the spinner 
  	 */
    
    $.showLoadingIcon = function(color, ps, _PS, element) {
        var myInterval;
        var spinner;
        var top = $(element).height() / 2;
        var left = $(element).width() / 2;
        
        if (element === ".ps-carousel") {
            top = $(window).height() / 2;
            left = $(window).width() / 2;
        }
        ps.addEventHandler(_PS.EventTypes.onBeforeShow, function(e) {
            //show spinner
            $(element).prepend('<div class="ajaxLoaderIcon" style="position: absolute; top:' + top + 'px; left:' + left + 'px;"></div>');
            //show spinner
            $(".ajaxLoaderIcon").spin(color);
            spinner = true;
        });

        // onDisplayImage
        ps.addEventHandler(_PS.EventTypes.onDisplayImage, function(e) {
            myInterval = setInterval(function() {
                checkImageLoad(ps.getCurrentImage())
            }, 100);
        });
        
        function checkImageLoad(img) {
            if (img.imageEl.complete) {
                clearInterval(myInterval);
                spinner = false;
                //hide spinner
                $(".ajaxLoaderIcon").remove();
            } else {
                if (!spinner) {
                    //show spinner
                    $(element).prepend('<div class="ajaxLoaderIcon" style="position: absolute; top:' + top + 'px; left:' + left + 'px;"></div>');
                    //show spinner
                    $(".ajaxLoaderIcon").spin(color);
                    spinner = true;
                }
            }
        }
    };


});

/**************************************************************************************



/common/js/lib/jquery/slides.min.jquery.js



**************************************************************************************/
/*
* Slides, A Slideshow Plugin for jQuery
* Intructions: http://slidesjs.com
* By: Nathan Searles, http://nathansearles.com
* Version: 1.1.9
* Updated: September 5th, 2011
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(function(a) {
    a.fn.slides = function(b) {
        return b = a.extend({}, a.fn.slides.option, b), this.each(function() {
            function w(g, h, i) {
                if (!p && o) {
                    p = !0, b.animationStart(n + 1);
                    switch (g) {
                        case "next":
                            l = n, k = n + 1, k = e === k ? 0 : k, r = f * 2, g = -f * 2, n = k;
                            break;
                        case "prev":
                            l = n, k = n - 1, k = k === -1 ? e - 1 : k, r = 0, g = 0, n = k;
                            break;
                        case "pagination":
                            k = parseInt(i, 10), l = a("." + b.paginationClass + " li." + b.currentClass + " a", c).attr("href").match("[^#/]+$"), k > l ? (r = f * 2, g = -f * 2) : (r = 0, g = 0), n = k
                    }
                    h === "fade" ? b.crossfade ? d.children(":eq(" + k + ")", c).css({zIndex: 10}).fadeIn(b.fadeSpeed, b.fadeEasing, function() {
                        b.autoHeight ? d.animate({height: d.children(":eq(" + k + ")", c).outerHeight()}, b.autoHeightSpeed, function() {
                            d.children(":eq(" + l + ")", c).css({display: "none",zIndex: 0}), d.children(":eq(" + k + ")", c).css({zIndex: 0}), b.animationComplete(k + 1), p = !1
                        }) : (d.children(":eq(" + l + ")", c).css({display: "none",zIndex: 0}), d.children(":eq(" + k + ")", c).css({zIndex: 0}), b.animationComplete(k + 1), p = !1)
                    }) : d.children(":eq(" + l + ")", c).fadeOut(b.fadeSpeed, b.fadeEasing, function() {
                        b.autoHeight ? d.animate({height: d.children(":eq(" + k + ")", c).outerHeight()}, b.autoHeightSpeed, function() {
                            d.children(":eq(" + k + ")", c).fadeIn(b.fadeSpeed, b.fadeEasing)
                        }) : d.children(":eq(" + k + ")", c).fadeIn(b.fadeSpeed, b.fadeEasing, function() {
                            a.browser.msie && a(this).get(0).style.removeAttribute("filter")
                        }), b.animationComplete(k + 1), p = !1
                    }) : (d.children(":eq(" + k + ")").css({left: r,display: "block"}), b.autoHeight ? d.animate({left: g,height: d.children(":eq(" + k + ")").outerHeight()}, b.slideSpeed, b.slideEasing, function() {
                        d.css({left: -f}), d.children(":eq(" + k + ")").css({left: f,zIndex: 5}), d.children(":eq(" + l + ")").css({left: f,display: "none",zIndex: 0}), b.animationComplete(k + 1), p = !1
                    }) : d.animate({left: g}, b.slideSpeed, b.slideEasing, function() {
                        d.css({left: -f}), d.children(":eq(" + k + ")").css({left: f,zIndex: 5}), d.children(":eq(" + l + ")").css({left: f,display: "none",zIndex: 0}), b.animationComplete(k + 1), p = !1
                    })), b.pagination && (a("." + b.paginationClass + " li." + b.currentClass, c).removeClass(b.currentClass), a("." + b.paginationClass + " li:eq(" + k + ")", c).addClass(b.currentClass))
                }
            }
            function x() {
                clearInterval(c.data("interval"))
            }
            function y() {
                b.pause ? (clearTimeout(c.data("pause")), clearInterval(c.data("interval")), u = setTimeout(function() {
                    clearTimeout(c.data("pause")), v = setInterval(function() {
                        w("next", i)
                    }, b.play), c.data("interval", v)
                }, b.pause), c.data("pause", u)) : x()
            }
            a("." + b.container, a(this)).children().wrapAll('<div class="slides_control"/>');
            var c = a(this), d = a(".slides_control", c), e = d.children().size(), f = d.children().outerWidth(), g = d.children().outerHeight(), h = b.start - 1, i = b.effect.indexOf(",") < 0 ? b.effect : b.effect.replace(" ", "").split(",")[0], j = b.effect.indexOf(",") < 0 ? i : b.effect.replace(" ", "").split(",")[1], k = 0, l = 0, m = 0, n = 0, o, p, q, r, s, t, u, v;
            if (e < 2)
                return a("." + b.container, a(this)).fadeIn(b.fadeSpeed, b.fadeEasing, function() {
                    o = !0, b.slidesLoaded()
                }), a("." + b.next + ", ." + b.prev).fadeOut(0), !1;
            if (e < 2)
                return;
            h < 0 && (h = 0), h > e && (h = e - 1), b.start && (n = h), b.randomize && d.randomize(), a("." + b.container, c).css({overflow: "hidden",position: "relative"}), d.children().css({position: "absolute",top: 0,left: d.children().outerWidth(),zIndex: 0,display: "none"}), d.css({position: "relative",width: f * 3,height: g,left: -f}), a("." + b.container, c).css({display: "block"}), b.autoHeight && (d.children().css({height: "auto"}), d.animate({height: d.children(":eq(" + h + ")").outerHeight()}, b.autoHeightSpeed));
            if (b.preload && d.find("img:eq(" + h + ")").length) {
                a("." + b.container, c).css({background: "url(" + b.preloadImage + ") no-repeat 50% 50%"});
                var z = d.find("img:eq(" + h + ")").attr("src") + "?" + (new Date).getTime();
                a("img", c).parent().attr("class") != "slides_control" ? t = d.children(":eq(0)")[0].tagName.toLowerCase() : t = d.find("img:eq(" + h + ")"), d.find("img:eq(" + h + ")").attr("src", z).load(function() {
                    d.find(t + ":eq(" + h + ")").fadeIn(b.fadeSpeed, b.fadeEasing, function() {
                        a(this).css({zIndex: 5}), a("." + b.container, c).css({background: ""}), o = !0, b.slidesLoaded()
                    })
                })
            } else
                d.children(":eq(" + h + ")").fadeIn(b.fadeSpeed, b.fadeEasing, function() {
                    o = !0, b.slidesLoaded()
                });
            b.bigTarget && (d.children().css({cursor: "pointer"}), d.children().click(function() {
                return w("next", i), !1
            })), b.hoverPause && b.play && (d.bind("mouseover", function() {
                x()
            }), d.bind("mouseleave", function() {
                y()
            })), b.generateNextPrev && (a("." + b.container, c).after('<a href="#" class="' + b.prev + '">Prev</a>'), a("." + b.prev, c).after('<a href="#" class="' + b.next + '">Next</a>')), a("." + b.next, c).click(function(a) {
                a.preventDefault(), b.play && y(), w("next", i)
            }), a("." + b.prev, c).click(function(a) {
                a.preventDefault(), b.play && y(), w("prev", i)
            }), b.generatePagination ? (b.prependPagination ? c.prepend("<ul class=" + b.paginationClass + "></ul>") : c.append("<ul class=" + b.paginationClass + "></ul>"), d.children().each(function() {
                a("." + b.paginationClass, c).append('<li><a href="#' + m + '">' + (m + 1) + "</a></li>"), m++
            })) : a("." + b.paginationClass + " li a", c).each(function() {
                a(this).attr("href", "#" + m), m++
            }), a("." + b.paginationClass + " li:eq(" + h + ")", c).addClass(b.currentClass), a("." + b.paginationClass + " li a", c).click(function() {
                return b.play && y(), q = a(this).attr("href").match("[^#/]+$"), n != q && w("pagination", j, q), !1
            }), a("a.link", c).click(function() {
                return b.play && y(), q = a(this).attr("href").match("[^#/]+$") - 1, n != q && w("pagination", j, q), !1
            }), b.play && (v = setInterval(function() {
                w("next", i)
            }, b.play), c.data("interval", v))
        })
    }, a.fn.slides.option = {preload: !1,preloadImage: "/img/loading.gif",container: "slides_container",generateNextPrev: !1,next: "next",prev: "prev",pagination: !0,generatePagination: !0,prependPagination: !1,paginationClass: "pagination",currentClass: "current",fadeSpeed: 350,fadeEasing: "",slideSpeed: 350,slideEasing: "",start: 1,effect: "slide",crossfade: !1,randomize: !1,play: 0,pause: 0,hoverPause: !1,autoHeight: !1,autoHeightSpeed: 350,bigTarget: !1,animationStart: function() {
        },animationComplete: function() {
        },slidesLoaded: function() {
        }}, a.fn.randomize = function(b) {
        function c() {
            return Math.round(Math.random()) - .5
        }
        return a(this).each(function() {
            var d = a(this), e = d.children(), f = e.length;
            if (f > 1) {
                e.hide();
                var g = [];
                for (i = 0; i < f; i++)
                    g[g.length] = i;
                g = g.sort(c), a.each(g, function(a, c) {
                    var f = e.eq(c), g = f.clone(!0);
                    g.show().appendTo(d), b !== undefined && b(f, g), f.remove()
                })
            }
        })
    }
})(jQuery);

/**************************************************************************************



/common/js/lib/yahoo/yahoo-dom-event/yahoo-dom-event.js



**************************************************************************************/
/*
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/
if (typeof YAHOO == "undefined" || !YAHOO) {
    var YAHOO = {};
}
YAHOO.namespace = function() {
    var b = arguments, g = null, e, c, f;
    for (e = 0; e < b.length; e = e + 1) {
        f = ("" + b[e]).split(".");
        g = YAHOO;
        for (c = (f[0] == "YAHOO") ? 1 : 0; c < f.length; c = c + 1) {
            g[f[c]] = g[f[c]] || {};
            g = g[f[c]];
        }
    }
    return g;
};
YAHOO.log = function(d, a, c) {
    var b = YAHOO.widget.Logger;
    if (b && b.log) {
        return b.log(d, a, c);
    } else {
        return false;
    }
};
YAHOO.register = function(a, f, e) {
    var k = YAHOO.env.modules, c, j, h, g, d;
    if (!k[a]) {
        k[a] = {versions: [],builds: []};
    }
    c = k[a];
    j = e.version;
    h = e.build;
    g = YAHOO.env.listeners;
    c.name = a;
    c.version = j;
    c.build = h;
    c.versions.push(j);
    c.builds.push(h);
    c.mainClass = f;
    for (d = 0; d < g.length; d = d + 1) {
        g[d](c);
    }
    if (f) {
        f.VERSION = j;
        f.BUILD = h;
    } else {
        YAHOO.log("mainClass is undefined for module " + a, "warn");
    }
};
YAHOO.env = YAHOO.env || {modules: [],listeners: []};
YAHOO.env.getVersion = function(a) {
    return YAHOO.env.modules[a] || null;
};
YAHOO.env.parseUA = function(d) {
    var e = function(i) {
        var j = 0;
        return parseFloat(i.replace(/\./g, function() {
            return (j++ == 1) ? "" : ".";
        }));
    }, h = navigator, g = {ie: 0,opera: 0,gecko: 0,webkit: 0,chrome: 0,mobile: null,air: 0,ipad: 0,iphone: 0,ipod: 0,ios: null,android: 0,webos: 0,caja: h && h.cajaVersion,secure: false,os: null}, c = d || (navigator && navigator.userAgent), f = window && window.location, b = f && f.href, a;
    g.secure = b && (b.toLowerCase().indexOf("https") === 0);
    if (c) {
        if ((/windows|win32/i).test(c)) {
            g.os = "windows";
        } else {
            if ((/macintosh/i).test(c)) {
                g.os = "macintosh";
            } else {
                if ((/rhino/i).test(c)) {
                    g.os = "rhino";
                }
            }
        }
        if ((/KHTML/).test(c)) {
            g.webkit = 1;
        }
        a = c.match(/AppleWebKit\/([^\s]*)/);
        if (a && a[1]) {
            g.webkit = e(a[1]);
            if (/ Mobile\//.test(c)) {
                g.mobile = "Apple";
                a = c.match(/OS ([^\s]*)/);
                if (a && a[1]) {
                    a = e(a[1].replace("_", "."));
                }
                g.ios = a;
                g.ipad = g.ipod = g.iphone = 0;
                a = c.match(/iPad|iPod|iPhone/);
                if (a && a[0]) {
                    g[a[0].toLowerCase()] = g.ios;
                }
            } else {
                a = c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);
                if (a) {
                    g.mobile = a[0];
                }
                if (/webOS/.test(c)) {
                    g.mobile = "WebOS";
                    a = c.match(/webOS\/([^\s]*);/);
                    if (a && a[1]) {
                        g.webos = e(a[1]);
                    }
                }
                if (/ Android/.test(c)) {
                    g.mobile = "Android";
                    a = c.match(/Android ([^\s]*);/);
                    if (a && a[1]) {
                        g.android = e(a[1]);
                    }
                }
            }
            a = c.match(/Chrome\/([^\s]*)/);
            if (a && a[1]) {
                g.chrome = e(a[1]);
            } else {
                a = c.match(/AdobeAIR\/([^\s]*)/);
                if (a) {
                    g.air = a[0];
                }
            }
        }
        if (!g.webkit) {
            a = c.match(/Opera[\s\/]([^\s]*)/);
            if (a && a[1]) {
                g.opera = e(a[1]);
                a = c.match(/Version\/([^\s]*)/);
                if (a && a[1]) {
                    g.opera = e(a[1]);
                }
                a = c.match(/Opera Mini[^;]*/);
                if (a) {
                    g.mobile = a[0];
                }
            } else {
                a = c.match(/MSIE\s([^;]*)/);
                if (a && a[1]) {
                    g.ie = e(a[1]);
                } else {
                    a = c.match(/Gecko\/([^\s]*)/);
                    if (a) {
                        g.gecko = 1;
                        a = c.match(/rv:([^\s\)]*)/);
                        if (a && a[1]) {
                            g.gecko = e(a[1]);
                        }
                    }
                }
            }
        }
    }
    return g;
};
YAHOO.env.ua = YAHOO.env.parseUA();
(function() {
    YAHOO.namespace("util", "widget", "example");
    if ("undefined" !== typeof YAHOO_config) {
        var b = YAHOO_config.listener, a = YAHOO.env.listeners, d = true, c;
        if (b) {
            for (c = 0; c < a.length; c++) {
                if (a[c] == b) {
                    d = false;
                    break;
                }
            }
            if (d) {
                a.push(b);
            }
        }
    }
})();
YAHOO.lang = YAHOO.lang || {};
(function() {
    var f = YAHOO.lang, a = Object.prototype, c = "[object Array]", h = "[object Function]", i = "[object Object]", b = [], g = {"&": "&amp;","<": "&lt;",">": "&gt;",'"': "&quot;","'": "&#x27;","/": "&#x2F;","`": "&#x60;"}, d = ["toString", "valueOf"], e = {isArray: function(j) {
            return a.toString.apply(j) === c;
        },isBoolean: function(j) {
            return typeof j === "boolean";
        },isFunction: function(j) {
            return (typeof j === "function") || a.toString.apply(j) === h;
        },isNull: function(j) {
            return j === null;
        },isNumber: function(j) {
            return typeof j === "number" && isFinite(j);
        },isObject: function(j) {
            return (j && (typeof j === "object" || f.isFunction(j))) || false;
        },isString: function(j) {
            return typeof j === "string";
        },isUndefined: function(j) {
            return typeof j === "undefined";
        },_IEEnumFix: (YAHOO.env.ua.ie) ? function(l, k) {
            var j, n, m;
            for (j = 0; j < d.length; j = j + 1) {
                n = d[j];
                m = k[n];
                if (f.isFunction(m) && m != a[n]) {
                    l[n] = m;
                }
            }
        } : function() {
        },escapeHTML: function(j) {
            return j.replace(/[&<>"'\/`]/g, function(k) {
                return g[k];
            });
        },extend: function(m, n, l) {
            if (!n || !m) {
                throw new Error("extend failed, please check that " + "all dependencies are included.");
            }
            var k = function() {
            }, j;
            k.prototype = n.prototype;
            m.prototype = new k();
            m.prototype.constructor = m;
            m.superclass = n.prototype;
            if (n.prototype.constructor == a.constructor) {
                n.prototype.constructor = n;
            }
            if (l) {
                for (j in l) {
                    if (f.hasOwnProperty(l, j)) {
                        m.prototype[j] = l[j];
                    }
                }
                f._IEEnumFix(m.prototype, l);
            }
        },augmentObject: function(n, m) {
            if (!m || !n) {
                throw new Error("Absorb failed, verify dependencies.");
            }
            var j = arguments, l, o, k = j[2];
            if (k && k !== true) {
                for (l = 2; l < j.length; l = l + 1) {
                    n[j[l]] = m[j[l]];
                }
            } else {
                for (o in m) {
                    if (k || !(o in n)) {
                        n[o] = m[o];
                    }
                }
                f._IEEnumFix(n, m);
            }
            return n;
        },augmentProto: function(m, l) {
            if (!l || !m) {
                throw new Error("Augment failed, verify dependencies.");
            }
            var j = [m.prototype, l.prototype], k;
            for (k = 2; k < arguments.length; k = k + 1) {
                j.push(arguments[k]);
            }
            f.augmentObject.apply(this, j);
            return m;
        },dump: function(j, p) {
            var l, n, r = [], t = "{...}", k = "f(){...}", q = ", ", m = " => ";
            if (!f.isObject(j)) {
                return j + "";
            } else {
                if (j instanceof Date || ("nodeType" in j && "tagName" in j)) {
                    return j;
                } else {
                    if (f.isFunction(j)) {
                        return k;
                    }
                }
            }
            p = (f.isNumber(p)) ? p : 3;
            if (f.isArray(j)) {
                r.push("[");
                for (l = 0, n = j.length; l < n; l = l + 1) {
                    if (f.isObject(j[l])) {
                        r.push((p > 0) ? f.dump(j[l], p - 1) : t);
                    } else {
                        r.push(j[l]);
                    }
                    r.push(q);
                }
                if (r.length > 1) {
                    r.pop();
                }
                r.push("]");
            } else {
                r.push("{");
                for (l in j) {
                    if (f.hasOwnProperty(j, l)) {
                        r.push(l + m);
                        if (f.isObject(j[l])) {
                            r.push((p > 0) ? f.dump(j[l], p - 1) : t);
                        } else {
                            r.push(j[l]);
                        }
                        r.push(q);
                    }
                }
                if (r.length > 1) {
                    r.pop();
                }
                r.push("}");
            }
            return r.join("");
        },substitute: function(x, y, E, l) {
            var D, C, B, G, t, u, F = [], p, z = x.length, A = "dump", r = " ", q = "{", m = "}", n, w;
            for (; ; ) {
                D = x.lastIndexOf(q, z);
                if (D < 0) {
                    break;
                }
                C = x.indexOf(m, D);
                if (D + 1 > C) {
                    break;
                }
                p = x.substring(D + 1, C);
                G = p;
                u = null;
                B = G.indexOf(r);
                if (B > -1) {
                    u = G.substring(B + 1);
                    G = G.substring(0, B);
                }
                t = y[G];
                if (E) {
                    t = E(G, t, u);
                }
                if (f.isObject(t)) {
                    if (f.isArray(t)) {
                        t = f.dump(t, parseInt(u, 10));
                    } else {
                        u = u || "";
                        n = u.indexOf(A);
                        if (n > -1) {
                            u = u.substring(4);
                        }
                        w = t.toString();
                        if (w === i || n > -1) {
                            t = f.dump(t, parseInt(u, 10));
                        } else {
                            t = w;
                        }
                    }
                } else {
                    if (!f.isString(t) && !f.isNumber(t)) {
                        t = "~-" + F.length + "-~";
                        F[F.length] = p;
                    }
                }
                x = x.substring(0, D) + t + x.substring(C + 1);
                if (l === false) {
                    z = D - 1;
                }
            }
            for (D = F.length - 1; D >= 0; D = D - 1) {
                x = x.replace(new RegExp("~-" + D + "-~"), "{" + F[D] + "}", "g");
            }
            return x;
        },trim: function(j) {
            try {
                return j.replace(/^\s+|\s+$/g, "");
            } catch (k) {
                return j;
            }
        },merge: function() {
            var n = {}, k = arguments, j = k.length, m;
            for (m = 0; m < j; m = m + 1) {
                f.augmentObject(n, k[m], true);
            }
            return n;
        },later: function(t, k, u, n, p) {
            t = t || 0;
            k = k || {};
            var l = u, s = n, q, j;
            if (f.isString(u)) {
                l = k[u];
            }
            if (!l) {
                throw new TypeError("method undefined");
            }
            if (!f.isUndefined(n) && !f.isArray(s)) {
                s = [n];
            }
            q = function() {
                l.apply(k, s || b);
            };
            j = (p) ? setInterval(q, t) : setTimeout(q, t);
            return {interval: p,cancel: function() {
                    if (this.interval) {
                        clearInterval(j);
                    } else {
                        clearTimeout(j);
                    }
                }};
        },isValue: function(j) {
            return (f.isObject(j) || f.isString(j) || f.isNumber(j) || f.isBoolean(j));
        }};
    f.hasOwnProperty = (a.hasOwnProperty) ? function(j, k) {
        return j && j.hasOwnProperty && j.hasOwnProperty(k);
    } : function(j, k) {
        return !f.isUndefined(j[k]) && j.constructor.prototype[k] !== j[k];
    };
    e.augmentObject(f, e, true);
    YAHOO.util.Lang = f;
    f.augment = f.augmentProto;
    YAHOO.augment = f.augmentProto;
    YAHOO.extend = f.extend;
})();
YAHOO.register("yahoo", YAHOO, {version: "2.9.0",build: "2800"});
(function() {
    YAHOO.env._id_counter = YAHOO.env._id_counter || 0;
    var e = YAHOO.util, k = YAHOO.lang, L = YAHOO.env.ua, a = YAHOO.lang.trim, B = {}, F = {}, m = /^t(?:able|d|h)$/i, w = /color$/i, j = window.document, v = j.documentElement, C = "ownerDocument", M = "defaultView", U = "documentElement", S = "compatMode", z = "offsetLeft", o = "offsetTop", T = "offsetParent", x = "parentNode", K = "nodeType", c = "tagName", n = "scrollLeft", H = "scrollTop", p = "getBoundingClientRect", V = "getComputedStyle", y = "currentStyle", l = "CSS1Compat", A = "BackCompat", E = "class", f = "className", i = "", b = " ", R = "(?:^|\\s)", J = "(?= |$)", t = "g", O = "position", D = "fixed", u = "relative", I = "left", N = "top", Q = "medium", P = "borderLeftWidth", q = "borderTopWidth", d = L.opera, h = L.webkit, g = L.gecko, s = L.ie;
    e.Dom = {CUSTOM_ATTRIBUTES: (!v.hasAttribute) ? {"for": "htmlFor","class": f} : {"htmlFor": "for","className": E},DOT_ATTRIBUTES: {checked: true},get: function(aa) {
            var ac, X, ab, Z, W, G, Y = null;
            if (aa) {
                if (typeof aa == "string" || typeof aa == "number") {
                    ac = aa + "";
                    aa = j.getElementById(aa);
                    G = (aa) ? aa.attributes : null;
                    if (aa && G && G.id && G.id.value === ac) {
                        return aa;
                    } else {
                        if (aa && j.all) {
                            aa = null;
                            X = j.all[ac];
                            if (X && X.length) {
                                for (Z = 0, W = X.length; Z < W; ++Z) {
                                    if (X[Z].id === ac) {
                                        return X[Z];
                                    }
                                }
                            }
                        }
                    }
                } else {
                    if (e.Element && aa instanceof e.Element) {
                        aa = aa.get("element");
                    } else {
                        if (!aa.nodeType && "length" in aa) {
                            ab = [];
                            for (Z = 0, W = aa.length; Z < W; ++Z) {
                                ab[ab.length] = e.Dom.get(aa[Z]);
                            }
                            aa = ab;
                        }
                    }
                }
                Y = aa;
            }
            return Y;
        },getComputedStyle: function(G, W) {
            if (window[V]) {
                return G[C][M][V](G, null)[W];
            } else {
                if (G[y]) {
                    return e.Dom.IE_ComputedStyle.get(G, W);
                }
            }
        },getStyle: function(G, W) {
            return e.Dom.batch(G, e.Dom._getStyle, W);
        },_getStyle: function() {
            if (window[V]) {
                return function(G, Y) {
                    Y = (Y === "float") ? Y = "cssFloat" : e.Dom._toCamel(Y);
                    var X = G.style[Y], W;
                    if (!X) {
                        W = G[C][M][V](G, null);
                        if (W) {
                            X = W[Y];
                        }
                    }
                    return X;
                };
            } else {
                if (v[y]) {
                    return function(G, Y) {
                        var X;
                        switch (Y) {
                            case "opacity":
                                X = 100;
                                try {
                                    X = G.filters["DXImageTransform.Microsoft.Alpha"].opacity;
                                } catch (Z) {
                                    try {
                                        X = G.filters("alpha").opacity;
                                    } catch (W) {
                                    }
                                }
                                return X / 100;
                            case "float":
                                Y = "styleFloat";
                            default:
                                Y = e.Dom._toCamel(Y);
                                X = G[y] ? G[y][Y] : null;
                                return (G.style[Y] || X);
                        }
                    };
                }
            }
        }(),setStyle: function(G, W, X) {
            e.Dom.batch(G, e.Dom._setStyle, {prop: W,val: X});
        },_setStyle: function() {
            if (!window.getComputedStyle && j.documentElement.currentStyle) {
                return function(W, G) {
                    var X = e.Dom._toCamel(G.prop), Y = G.val;
                    if (W) {
                        switch (X) {
                            case "opacity":
                                if (Y === "" || Y === null || Y === 1) {
                                    W.style.removeAttribute("filter");
                                } else {
                                    if (k.isString(W.style.filter)) {
                                        W.style.filter = "alpha(opacity=" + Y * 100 + ")";
                                        if (!W[y] || !W[y].hasLayout) {
                                            W.style.zoom = 1;
                                        }
                                    }
                                }
                                break;
                            case "float":
                                X = "styleFloat";
                            default:
                                W.style[X] = Y;
                        }
                    } else {
                    }
                };
            } else {
                return function(W, G) {
                    var X = e.Dom._toCamel(G.prop), Y = G.val;
                    if (W) {
                        if (X == "float") {
                            X = "cssFloat";
                        }
                        W.style[X] = Y;
                    } else {
                    }
                };
            }
        }(),getXY: function(G) {
            return e.Dom.batch(G, e.Dom._getXY);
        },_canPosition: function(G) {
            return (e.Dom._getStyle(G, "display") !== "none" && e.Dom._inDoc(G));
        },_getXY: function(W) {
            var X, G, Z, ab, Y, aa, ac = Math.round, ad = false;
            if (e.Dom._canPosition(W)) {
                Z = W[p]();
                ab = W[C];
                X = e.Dom.getDocumentScrollLeft(ab);
                G = e.Dom.getDocumentScrollTop(ab);
                ad = [Z[I], Z[N]];
                if (Y || aa) {
                    ad[0] -= aa;
                    ad[1] -= Y;
                }
                if ((G || X)) {
                    ad[0] += X;
                    ad[1] += G;
                }
                ad[0] = ac(ad[0]);
                ad[1] = ac(ad[1]);
            } else {
            }
            return ad;
        },getX: function(G) {
            var W = function(X) {
                return e.Dom.getXY(X)[0];
            };
            return e.Dom.batch(G, W, e.Dom, true);
        },getY: function(G) {
            var W = function(X) {
                return e.Dom.getXY(X)[1];
            };
            return e.Dom.batch(G, W, e.Dom, true);
        },setXY: function(G, X, W) {
            e.Dom.batch(G, e.Dom._setXY, {pos: X,noRetry: W});
        },_setXY: function(G, Z) {
            var aa = e.Dom._getStyle(G, O), Y = e.Dom.setStyle, ad = Z.pos, W = Z.noRetry, ab = [parseInt(e.Dom.getComputedStyle(G, I), 10), parseInt(e.Dom.getComputedStyle(G, N), 10)], ac, X;
            ac = e.Dom._getXY(G);
            if (!ad || ac === false) {
                return false;
            }
            if (aa == "static") {
                aa = u;
                Y(G, O, aa);
            }
            if (isNaN(ab[0])) {
                ab[0] = (aa == u) ? 0 : G[z];
            }
            if (isNaN(ab[1])) {
                ab[1] = (aa == u) ? 0 : G[o];
            }
            if (ad[0] !== null) {
                Y(G, I, ad[0] - ac[0] + ab[0] + "px");
            }
            if (ad[1] !== null) {
                Y(G, N, ad[1] - ac[1] + ab[1] + "px");
            }
            if (!W) {
                X = e.Dom._getXY(G);
                if ((ad[0] !== null && X[0] != ad[0]) || (ad[1] !== null && X[1] != ad[1])) {
                    e.Dom._setXY(G, {pos: ad,noRetry: true});
                }
            }
        },setX: function(W, G) {
            e.Dom.setXY(W, [G, null]);
        },setY: function(G, W) {
            e.Dom.setXY(G, [null, W]);
        },getRegion: function(G) {
            var W = function(X) {
                var Y = false;
                if (e.Dom._canPosition(X)) {
                    Y = e.Region.getRegion(X);
                } else {
                }
                return Y;
            };
            return e.Dom.batch(G, W, e.Dom, true);
        },getClientWidth: function() {
            return e.Dom.getViewportWidth();
        },getClientHeight: function() {
            return e.Dom.getViewportHeight();
        },getElementsByClassName: function(ab, af, ac, ae, X, ad) {
            af = af || "*";
            ac = (ac) ? e.Dom.get(ac) : null || j;
            if (!ac) {
                return [];
            }
            var W = [], G = ac.getElementsByTagName(af), Z = e.Dom.hasClass;
            for (var Y = 0, aa = G.length; Y < aa; ++Y) {
                if (Z(G[Y], ab)) {
                    W[W.length] = G[Y];
                }
            }
            if (ae) {
                e.Dom.batch(W, ae, X, ad);
            }
            return W;
        },hasClass: function(W, G) {
            return e.Dom.batch(W, e.Dom._hasClass, G);
        },_hasClass: function(X, W) {
            var G = false, Y;
            if (X && W) {
                Y = e.Dom._getAttribute(X, f) || i;
                if (Y) {
                    Y = Y.replace(/\s+/g, b);
                }
                if (W.exec) {
                    G = W.test(Y);
                } else {
                    G = W && (b + Y + b).indexOf(b + W + b) > -1;
                }
            } else {
            }
            return G;
        },addClass: function(W, G) {
            return e.Dom.batch(W, e.Dom._addClass, G);
        },_addClass: function(X, W) {
            var G = false, Y;
            if (X && W) {
                Y = e.Dom._getAttribute(X, f) || i;
                if (!e.Dom._hasClass(X, W)) {
                    e.Dom.setAttribute(X, f, a(Y + b + W));
                    G = true;
                }
            } else {
            }
            return G;
        },removeClass: function(W, G) {
            return e.Dom.batch(W, e.Dom._removeClass, G);
        },_removeClass: function(Y, X) {
            var W = false, aa, Z, G;
            if (Y && X) {
                aa = e.Dom._getAttribute(Y, f) || i;
                e.Dom.setAttribute(Y, f, aa.replace(e.Dom._getClassRegex(X), i));
                Z = e.Dom._getAttribute(Y, f);
                if (aa !== Z) {
                    e.Dom.setAttribute(Y, f, a(Z));
                    W = true;
                    if (e.Dom._getAttribute(Y, f) === "") {
                        G = (Y.hasAttribute && Y.hasAttribute(E)) ? E : f;
                        Y.removeAttribute(G);
                    }
                }
            } else {
            }
            return W;
        },replaceClass: function(X, W, G) {
            return e.Dom.batch(X, e.Dom._replaceClass, {from: W,to: G});
        },_replaceClass: function(Y, X) {
            var W, ab, aa, G = false, Z;
            if (Y && X) {
                ab = X.from;
                aa = X.to;
                if (!aa) {
                    G = false;
                } else {
                    if (!ab) {
                        G = e.Dom._addClass(Y, X.to);
                    } else {
                        if (ab !== aa) {
                            Z = e.Dom._getAttribute(Y, f) || i;
                            W = (b + Z.replace(e.Dom._getClassRegex(ab), b + aa).replace(/\s+/g, b)).split(e.Dom._getClassRegex(aa));
                            W.splice(1, 0, b + aa);
                            e.Dom.setAttribute(Y, f, a(W.join(i)));
                            G = true;
                        }
                    }
                }
            } else {
            }
            return G;
        },generateId: function(G, X) {
            X = X || "yui-gen";
            var W = function(Y) {
                if (Y && Y.id) {
                    return Y.id;
                }
                var Z = X + YAHOO.env._id_counter++;
                if (Y) {
                    if (Y[C] && Y[C].getElementById(Z)) {
                        return e.Dom.generateId(Y, Z + X);
                    }
                    Y.id = Z;
                }
                return Z;
            };
            return e.Dom.batch(G, W, e.Dom, true) || W.apply(e.Dom, arguments);
        },isAncestor: function(W, X) {
            W = e.Dom.get(W);
            X = e.Dom.get(X);
            var G = false;
            if ((W && X) && (W[K] && X[K])) {
                if (W.contains && W !== X) {
                    G = W.contains(X);
                } else {
                    if (W.compareDocumentPosition) {
                        G = !!(W.compareDocumentPosition(X) & 16);
                    }
                }
            } else {
            }
            return G;
        },inDocument: function(G, W) {
            return e.Dom._inDoc(e.Dom.get(G), W);
        },_inDoc: function(W, X) {
            var G = false;
            if (W && W[c]) {
                X = X || W[C];
                G = e.Dom.isAncestor(X[U], W);
            } else {
            }
            return G;
        },getElementsBy: function(W, af, ab, ad, X, ac, ae) {
            af = af || "*";
            ab = (ab) ? e.Dom.get(ab) : null || j;
            var aa = (ae) ? null : [], G;
            if (ab) {
                G = ab.getElementsByTagName(af);
                for (var Y = 0, Z = G.length; Y < Z; ++Y) {
                    if (W(G[Y])) {
                        if (ae) {
                            aa = G[Y];
                            break;
                        } else {
                            aa[aa.length] = G[Y];
                        }
                    }
                }
                if (ad) {
                    e.Dom.batch(aa, ad, X, ac);
                }
            }
            return aa;
        },getElementBy: function(X, G, W) {
            return e.Dom.getElementsBy(X, G, W, null, null, null, true);
        },batch: function(X, ab, aa, Z) {
            var Y = [], W = (Z) ? aa : null;
            X = (X && (X[c] || X.item)) ? X : e.Dom.get(X);
            if (X && ab) {
                if (X[c] || X.length === undefined) {
                    return ab.call(W, X, aa);
                }
                for (var G = 0; G < X.length; ++G) {
                    Y[Y.length] = ab.call(W || X[G], X[G], aa);
                }
            } else {
                return false;
            }
            return Y;
        },getDocumentHeight: function() {
            var W = (j[S] != l || h) ? j.body.scrollHeight : v.scrollHeight, G = Math.max(W, e.Dom.getViewportHeight());
            return G;
        },getDocumentWidth: function() {
            var W = (j[S] != l || h) ? j.body.scrollWidth : v.scrollWidth, G = Math.max(W, e.Dom.getViewportWidth());
            return G;
        },getViewportHeight: function() {
            var G = self.innerHeight, W = j[S];
            if ((W || s) && !d) {
                G = (W == l) ? v.clientHeight : j.body.clientHeight;
            }
            return G;
        },getViewportWidth: function() {
            var G = self.innerWidth, W = j[S];
            if (W || s) {
                G = (W == l) ? v.clientWidth : j.body.clientWidth;
            }
            return G;
        },getAncestorBy: function(G, W) {
            while ((G = G[x])) {
                if (e.Dom._testElement(G, W)) {
                    return G;
                }
            }
            return null;
        },getAncestorByClassName: function(W, G) {
            W = e.Dom.get(W);
            if (!W) {
                return null;
            }
            var X = function(Y) {
                return e.Dom.hasClass(Y, G);
            };
            return e.Dom.getAncestorBy(W, X);
        },getAncestorByTagName: function(W, G) {
            W = e.Dom.get(W);
            if (!W) {
                return null;
            }
            var X = function(Y) {
                return Y[c] && Y[c].toUpperCase() == G.toUpperCase();
            };
            return e.Dom.getAncestorBy(W, X);
        },getPreviousSiblingBy: function(G, W) {
            while (G) {
                G = G.previousSibling;
                if (e.Dom._testElement(G, W)) {
                    return G;
                }
            }
            return null;
        },getPreviousSibling: function(G) {
            G = e.Dom.get(G);
            if (!G) {
                return null;
            }
            return e.Dom.getPreviousSiblingBy(G);
        },getNextSiblingBy: function(G, W) {
            while (G) {
                G = G.nextSibling;
                if (e.Dom._testElement(G, W)) {
                    return G;
                }
            }
            return null;
        },getNextSibling: function(G) {
            G = e.Dom.get(G);
            if (!G) {
                return null;
            }
            return e.Dom.getNextSiblingBy(G);
        },getFirstChildBy: function(G, X) {
            var W = (e.Dom._testElement(G.firstChild, X)) ? G.firstChild : null;
            return W || e.Dom.getNextSiblingBy(G.firstChild, X);
        },getFirstChild: function(G, W) {
            G = e.Dom.get(G);
            if (!G) {
                return null;
            }
            return e.Dom.getFirstChildBy(G);
        },getLastChildBy: function(G, X) {
            if (!G) {
                return null;
            }
            var W = (e.Dom._testElement(G.lastChild, X)) ? G.lastChild : null;
            return W || e.Dom.getPreviousSiblingBy(G.lastChild, X);
        },getLastChild: function(G) {
            G = e.Dom.get(G);
            return e.Dom.getLastChildBy(G);
        },getChildrenBy: function(W, Y) {
            var X = e.Dom.getFirstChildBy(W, Y), G = X ? [X] : [];
            e.Dom.getNextSiblingBy(X, function(Z) {
                if (!Y || Y(Z)) {
                    G[G.length] = Z;
                }
                return false;
            });
            return G;
        },getChildren: function(G) {
            G = e.Dom.get(G);
            if (!G) {
            }
            return e.Dom.getChildrenBy(G);
        },getDocumentScrollLeft: function(G) {
            G = G || j;
            return Math.max(G[U].scrollLeft, G.body.scrollLeft);
        },getDocumentScrollTop: function(G) {
            G = G || j;
            return Math.max(G[U].scrollTop, G.body.scrollTop);
        },insertBefore: function(W, G) {
            W = e.Dom.get(W);
            G = e.Dom.get(G);
            if (!W || !G || !G[x]) {
                return null;
            }
            return G[x].insertBefore(W, G);
        },insertAfter: function(W, G) {
            W = e.Dom.get(W);
            G = e.Dom.get(G);
            if (!W || !G || !G[x]) {
                return null;
            }
            if (G.nextSibling) {
                return G[x].insertBefore(W, G.nextSibling);
            } else {
                return G[x].appendChild(W);
            }
        },getClientRegion: function() {
            var X = e.Dom.getDocumentScrollTop(), W = e.Dom.getDocumentScrollLeft(), Y = e.Dom.getViewportWidth() + W, G = e.Dom.getViewportHeight() + X;
            return new e.Region(X, Y, G, W);
        },setAttribute: function(W, G, X) {
            e.Dom.batch(W, e.Dom._setAttribute, {attr: G,val: X});
        },_setAttribute: function(X, W) {
            var G = e.Dom._toCamel(W.attr), Y = W.val;
            if (X && X.setAttribute) {
                if (e.Dom.DOT_ATTRIBUTES[G] && X.tagName && X.tagName != "BUTTON") {
                    X[G] = Y;
                } else {
                    G = e.Dom.CUSTOM_ATTRIBUTES[G] || G;
                    X.setAttribute(G, Y);
                }
            } else {
            }
        },getAttribute: function(W, G) {
            return e.Dom.batch(W, e.Dom._getAttribute, G);
        },_getAttribute: function(W, G) {
            var X;
            G = e.Dom.CUSTOM_ATTRIBUTES[G] || G;
            if (e.Dom.DOT_ATTRIBUTES[G]) {
                X = W[G];
            } else {
                if (W && "getAttribute" in W) {
                    if (/^(?:href|src)$/.test(G)) {
                        X = W.getAttribute(G, 2);
                    } else {
                        X = W.getAttribute(G);
                    }
                } else {
                }
            }
            return X;
        },_toCamel: function(W) {
            var X = B;
            function G(Y, Z) {
                return Z.toUpperCase();
            }
            return X[W] || (X[W] = W.indexOf("-") === -1 ? W : W.replace(/-([a-z])/gi, G));
        },_getClassRegex: function(W) {
            var G;
            if (W !== undefined) {
                if (W.exec) {
                    G = W;
                } else {
                    G = F[W];
                    if (!G) {
                        W = W.replace(e.Dom._patterns.CLASS_RE_TOKENS, "\\$1");
                        W = W.replace(/\s+/g, b);
                        G = F[W] = new RegExp(R + W + J, t);
                    }
                }
            }
            return G;
        },_patterns: {ROOT_TAG: /^body|html$/i,CLASS_RE_TOKENS: /([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement: function(G, W) {
            return G && G[K] == 1 && (!W || W(G));
        },_calcBorders: function(X, Y) {
            var W = parseInt(e.Dom[V](X, q), 10) || 0, G = parseInt(e.Dom[V](X, P), 10) || 0;
            if (g) {
                if (m.test(X[c])) {
                    W = 0;
                    G = 0;
                }
            }
            Y[0] += G;
            Y[1] += W;
            return Y;
        }};
    var r = e.Dom[V];
    if (L.opera) {
        e.Dom[V] = function(W, G) {
            var X = r(W, G);
            if (w.test(G)) {
                X = e.Dom.Color.toRGB(X);
            }
            return X;
        };
    }
    if (L.webkit) {
        e.Dom[V] = function(W, G) {
            var X = r(W, G);
            if (X === "rgba(0, 0, 0, 0)") {
                X = "transparent";
            }
            return X;
        };
    }
    if (L.ie && L.ie >= 8) {
        e.Dom.DOT_ATTRIBUTES.type = true;
    }
})();
YAHOO.util.Region = function(d, e, a, c) {
    this.top = d;
    this.y = d;
    this[1] = d;
    this.right = e;
    this.bottom = a;
    this.left = c;
    this.x = c;
    this[0] = c;
    this.width = this.right - this.left;
    this.height = this.bottom - this.top;
};
YAHOO.util.Region.prototype.contains = function(a) {
    return (a.left >= this.left && a.right <= this.right && a.top >= this.top && a.bottom <= this.bottom);
};
YAHOO.util.Region.prototype.getArea = function() {
    return ((this.bottom - this.top) * (this.right - this.left));
};
YAHOO.util.Region.prototype.intersect = function(f) {
    var d = Math.max(this.top, f.top), e = Math.min(this.right, f.right), a = Math.min(this.bottom, f.bottom), c = Math.max(this.left, f.left);
    if (a >= d && e >= c) {
        return new YAHOO.util.Region(d, e, a, c);
    } else {
        return null;
    }
};
YAHOO.util.Region.prototype.union = function(f) {
    var d = Math.min(this.top, f.top), e = Math.max(this.right, f.right), a = Math.max(this.bottom, f.bottom), c = Math.min(this.left, f.left);
    return new YAHOO.util.Region(d, e, a, c);
};
YAHOO.util.Region.prototype.toString = function() {
    return ("Region {" + "top: " + this.top + ", right: " + this.right + ", bottom: " + this.bottom + ", left: " + this.left + ", height: " + this.height + ", width: " + this.width + "}");
};
YAHOO.util.Region.getRegion = function(e) {
    var g = YAHOO.util.Dom.getXY(e), d = g[1], f = g[0] + e.offsetWidth, a = g[1] + e.offsetHeight, c = g[0];
    return new YAHOO.util.Region(d, f, a, c);
};
YAHOO.util.Point = function(a, b) {
    if (YAHOO.lang.isArray(a)) {
        b = a[1];
        a = a[0];
    }
    YAHOO.util.Point.superclass.constructor.call(this, b, a, b, a);
};
YAHOO.extend(YAHOO.util.Point, YAHOO.util.Region);
(function() {
    var b = YAHOO.util, a = "clientTop", f = "clientLeft", j = "parentNode", k = "right", w = "hasLayout", i = "px", u = "opacity", l = "auto", d = "borderLeftWidth", g = "borderTopWidth", p = "borderRightWidth", v = "borderBottomWidth", s = "visible", q = "transparent", n = "height", e = "width", h = "style", t = "currentStyle", r = /^width|height$/, o = /^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i, m = {get: function(x, z) {
            var y = "", A = x[t][z];
            if (z === u) {
                y = b.Dom.getStyle(x, u);
            } else {
                if (!A || (A.indexOf && A.indexOf(i) > -1)) {
                    y = A;
                } else {
                    if (b.Dom.IE_COMPUTED[z]) {
                        y = b.Dom.IE_COMPUTED[z](x, z);
                    } else {
                        if (o.test(A)) {
                            y = b.Dom.IE.ComputedStyle.getPixel(x, z);
                        } else {
                            y = A;
                        }
                    }
                }
            }
            return y;
        },getOffset: function(z, E) {
            var B = z[t][E], x = E.charAt(0).toUpperCase() + E.substr(1), C = "offset" + x, y = "pixel" + x, A = "", D;
            if (B == l) {
                D = z[C];
                if (D === undefined) {
                    A = 0;
                }
                A = D;
                if (r.test(E)) {
                    z[h][E] = D;
                    if (z[C] > D) {
                        A = D - (z[C] - D);
                    }
                    z[h][E] = l;
                }
            } else {
                if (!z[h][y] && !z[h][E]) {
                    z[h][E] = B;
                }
                A = z[h][y];
            }
            return A + i;
        },getBorderWidth: function(x, z) {
            var y = null;
            if (!x[t][w]) {
                x[h].zoom = 1;
            }
            switch (z) {
                case g:
                    y = x[a];
                    break;
                case v:
                    y = x.offsetHeight - x.clientHeight - x[a];
                    break;
                case d:
                    y = x[f];
                    break;
                case p:
                    y = x.offsetWidth - x.clientWidth - x[f];
                    break;
            }
            return y + i;
        },getPixel: function(y, x) {
            var A = null, B = y[t][k], z = y[t][x];
            y[h][k] = z;
            A = y[h].pixelRight;
            y[h][k] = B;
            return A + i;
        },getMargin: function(y, x) {
            var z;
            if (y[t][x] == l) {
                z = 0 + i;
            } else {
                z = b.Dom.IE.ComputedStyle.getPixel(y, x);
            }
            return z;
        },getVisibility: function(y, x) {
            var z;
            while ((z = y[t]) && z[x] == "inherit") {
                y = y[j];
            }
            return (z) ? z[x] : s;
        },getColor: function(y, x) {
            return b.Dom.Color.toRGB(y[t][x]) || q;
        },getBorderColor: function(y, x) {
            var z = y[t], A = z[x] || z.color;
            return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));
        }}, c = {};
    c.top = c.right = c.bottom = c.left = c[e] = c[n] = m.getOffset;
    c.color = m.getColor;
    c[g] = c[p] = c[v] = c[d] = m.getBorderWidth;
    c.marginTop = c.marginRight = c.marginBottom = c.marginLeft = m.getMargin;
    c.visibility = m.getVisibility;
    c.borderColor = c.borderTopColor = c.borderRightColor = c.borderBottomColor = c.borderLeftColor = m.getBorderColor;
    b.Dom.IE_COMPUTED = c;
    b.Dom.IE_ComputedStyle = m;
})();
(function() {
    var c = "toString", a = parseInt, b = RegExp, d = YAHOO.util;
    d.Dom.Color = {KEYWORDS: {black: "000",silver: "c0c0c0",gray: "808080",white: "fff",maroon: "800000",red: "f00",purple: "800080",fuchsia: "f0f",green: "008000",lime: "0f0",olive: "808000",yellow: "ff0",navy: "000080",blue: "00f",teal: "008080",aqua: "0ff"},re_RGB: /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex: /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3: /([0-9A-F])/gi,toRGB: function(e) {
            if (!d.Dom.Color.re_RGB.test(e)) {
                e = d.Dom.Color.toHex(e);
            }
            if (d.Dom.Color.re_hex.exec(e)) {
                e = "rgb(" + [a(b.$1, 16), a(b.$2, 16), a(b.$3, 16)].join(", ") + ")";
            }
            return e;
        },toHex: function(f) {
            f = d.Dom.Color.KEYWORDS[f] || f;
            if (d.Dom.Color.re_RGB.exec(f)) {
                f = [Number(b.$1).toString(16), Number(b.$2).toString(16), Number(b.$3).toString(16)];
                for (var e = 0; e < f.length; e++) {
                    if (f[e].length < 2) {
                        f[e] = "0" + f[e];
                    }
                }
                f = f.join("");
            }
            if (f.length < 6) {
                f = f.replace(d.Dom.Color.re_hex3, "$1$1");
            }
            if (f !== "transparent" && f.indexOf("#") < 0) {
                f = "#" + f;
            }
            return f.toUpperCase();
        }};
}());
YAHOO.register("dom", YAHOO.util.Dom, {version: "2.9.0",build: "2800"});
YAHOO.util.CustomEvent = function(d, c, b, a, e) {
    this.type = d;
    this.scope = c || window;
    this.silent = b;
    this.fireOnce = e;
    this.fired = false;
    this.firedWith = null;
    this.signature = a || YAHOO.util.CustomEvent.LIST;
    this.subscribers = [];
    if (!this.silent) {
    }
    var f = "_YUICEOnSubscribe";
    if (d !== f) {
        this.subscribeEvent = new YAHOO.util.CustomEvent(f, this, true);
    }
    this.lastError = null;
};
YAHOO.util.CustomEvent.LIST = 0;
YAHOO.util.CustomEvent.FLAT = 1;
YAHOO.util.CustomEvent.prototype = {subscribe: function(b, c, d) {
        if (!b) {
            throw new Error("Invalid callback for subscriber to '" + this.type + "'");
        }
        if (this.subscribeEvent) {
            this.subscribeEvent.fire(b, c, d);
        }
        var a = new YAHOO.util.Subscriber(b, c, d);
        if (this.fireOnce && this.fired) {
            this.notify(a, this.firedWith);
        } else {
            this.subscribers.push(a);
        }
    },unsubscribe: function(d, f) {
        if (!d) {
            return this.unsubscribeAll();
        }
        var e = false;
        for (var b = 0, a = this.subscribers.length; b < a; ++b) {
            var c = this.subscribers[b];
            if (c && c.contains(d, f)) {
                this._delete(b);
                e = true;
            }
        }
        return e;
    },fire: function() {
        this.lastError = null;
        var h = [], a = this.subscribers.length;
        var d = [].slice.call(arguments, 0), c = true, f, b = false;
        if (this.fireOnce) {
            if (this.fired) {
                return true;
            } else {
                this.firedWith = d;
            }
        }
        this.fired = true;
        if (!a && this.silent) {
            return true;
        }
        if (!this.silent) {
        }
        var e = this.subscribers.slice();
        for (f = 0; f < a; ++f) {
            var g = e[f];
            if (!g || !g.fn) {
                b = true;
            } else {
                c = this.notify(g, d);
                if (false === c) {
                    if (!this.silent) {
                    }
                    break;
                }
            }
        }
        return (c !== false);
    },notify: function(g, c) {
        var b, i = null, f = g.getScope(this.scope), a = YAHOO.util.Event.throwErrors;
        if (!this.silent) {
        }
        if (this.signature == YAHOO.util.CustomEvent.FLAT) {
            if (c.length > 0) {
                i = c[0];
            }
            try {
                b = g.fn.call(f, i, g.obj);
            } catch (h) {
                this.lastError = h;
                if (a) {
                    throw h;
                }
            }
        } else {
            try {
                b = g.fn.call(f, this.type, c, g.obj);
            } catch (d) {
                this.lastError = d;
                if (a) {
                    throw d;
                }
            }
        }
        return b;
    },unsubscribeAll: function() {
        var a = this.subscribers.length, b;
        for (b = a - 1; b > -1; b--) {
            this._delete(b);
        }
        this.subscribers = [];
        return a;
    },_delete: function(a) {
        var b = this.subscribers[a];
        if (b) {
            delete b.fn;
            delete b.obj;
        }
        this.subscribers.splice(a, 1);
    },toString: function() {
        return "CustomEvent: " + "'" + this.type + "', " + "context: " + this.scope;
    }};
YAHOO.util.Subscriber = function(a, b, c) {
    this.fn = a;
    this.obj = YAHOO.lang.isUndefined(b) ? null : b;
    this.overrideContext = c;
};
YAHOO.util.Subscriber.prototype.getScope = function(a) {
    if (this.overrideContext) {
        if (this.overrideContext === true) {
            return this.obj;
        } else {
            return this.overrideContext;
        }
    }
    return a;
};
YAHOO.util.Subscriber.prototype.contains = function(a, b) {
    if (b) {
        return (this.fn == a && this.obj == b);
    } else {
        return (this.fn == a);
    }
};
YAHOO.util.Subscriber.prototype.toString = function() {
    return "Subscriber { obj: " + this.obj + ", overrideContext: " + (this.overrideContext || "no") + " }";
};
if (!YAHOO.util.Event) {
    YAHOO.util.Event = function() {
        var g = false, h = [], j = [], a = 0, e = [], b = 0, c = {63232: 38,63233: 40,63234: 37,63235: 39,63276: 33,63277: 34,25: 9}, d = YAHOO.env.ua.ie, f = "focusin", i = "focusout";
        return {POLL_RETRYS: 500,POLL_INTERVAL: 40,EL: 0,TYPE: 1,FN: 2,WFN: 3,UNLOAD_OBJ: 3,ADJ_SCOPE: 4,OBJ: 5,OVERRIDE: 6,CAPTURE: 7,lastError: null,isSafari: YAHOO.env.ua.webkit,webkit: YAHOO.env.ua.webkit,isIE: d,_interval: null,_dri: null,_specialTypes: {focusin: (d ? "focusin" : "focus"),focusout: (d ? "focusout" : "blur")},DOMReady: false,throwErrors: false,startInterval: function() {
                if (!this._interval) {
                    this._interval = YAHOO.lang.later(this.POLL_INTERVAL, this, this._tryPreloadAttach, null, true);
                }
            },onAvailable: function(q, m, o, p, n) {
                var k = (YAHOO.lang.isString(q)) ? [q] : q;
                for (var l = 0; l < k.length; l = l + 1) {
                    e.push({id: k[l],fn: m,obj: o,overrideContext: p,checkReady: n});
                }
                a = this.POLL_RETRYS;
                this.startInterval();
            },onContentReady: function(n, k, l, m) {
                this.onAvailable(n, k, l, m, true);
            },onDOMReady: function() {
                this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent, arguments);
            },_addListener: function(m, k, v, p, t, y) {
                if (!v || !v.call) {
                    return false;
                }
                if (this._isValidCollection(m)) {
                    var w = true;
                    for (var q = 0, s = m.length; q < s; ++q) {
                        w = this.on(m[q], k, v, p, t) && w;
                    }
                    return w;
                } else {
                    if (YAHOO.lang.isString(m)) {
                        var o = this.getEl(m);
                        if (o) {
                            m = o;
                        } else {
                            this.onAvailable(m, function() {
                                YAHOO.util.Event._addListener(m, k, v, p, t, y);
                            });
                            return true;
                        }
                    }
                }
                if (!m) {
                    return false;
                }
                if ("unload" == k && p !== this) {
                    j[j.length] = [m, k, v, p, t];
                    return true;
                }
                var l = m;
                if (t) {
                    if (t === true) {
                        l = p;
                    } else {
                        l = t;
                    }
                }
                var n = function(z) {
                    return v.call(l, YAHOO.util.Event.getEvent(z, m), p);
                };
                var x = [m, k, v, n, l, p, t, y];
                var r = h.length;
                h[r] = x;
                try {
                    this._simpleAdd(m, k, n, y);
                } catch (u) {
                    this.lastError = u;
                    this.removeListener(m, k, v);
                    return false;
                }
                return true;
            },_getType: function(k) {
                return this._specialTypes[k] || k;
            },addListener: function(m, p, l, n, o) {
                var k = ((p == f || p == i) && !YAHOO.env.ua.ie) ? true : false;
                return this._addListener(m, this._getType(p), l, n, o, k);
            },addFocusListener: function(l, k, m, n) {
                return this.on(l, f, k, m, n);
            },removeFocusListener: function(l, k) {
                return this.removeListener(l, f, k);
            },addBlurListener: function(l, k, m, n) {
                return this.on(l, i, k, m, n);
            },removeBlurListener: function(l, k) {
                return this.removeListener(l, i, k);
            },removeListener: function(l, k, r) {
                var m, p, u;
                k = this._getType(k);
                if (typeof l == "string") {
                    l = this.getEl(l);
                } else {
                    if (this._isValidCollection(l)) {
                        var s = true;
                        for (m = l.length - 1; m > -1; m--) {
                            s = (this.removeListener(l[m], k, r) && s);
                        }
                        return s;
                    }
                }
                if (!r || !r.call) {
                    return this.purgeElement(l, false, k);
                }
                if ("unload" == k) {
                    for (m = j.length - 1; m > -1; m--) {
                        u = j[m];
                        if (u && u[0] == l && u[1] == k && u[2] == r) {
                            j.splice(m, 1);
                            return true;
                        }
                    }
                    return false;
                }
                var n = null;
                var o = arguments[3];
                if ("undefined" === typeof o) {
                    o = this._getCacheIndex(h, l, k, r);
                }
                if (o >= 0) {
                    n = h[o];
                }
                if (!l || !n) {
                    return false;
                }
                var t = n[this.CAPTURE] === true ? true : false;
                try {
                    this._simpleRemove(l, k, n[this.WFN], t);
                } catch (q) {
                    this.lastError = q;
                    return false;
                }
                delete h[o][this.WFN];
                delete h[o][this.FN];
                h.splice(o, 1);
                return true;
            },getTarget: function(m, l) {
                var k = m.target || m.srcElement;
                return this.resolveTextNode(k);
            },resolveTextNode: function(l) {
                try {
                    if (l && 3 == l.nodeType) {
                        return l.parentNode;
                    }
                } catch (k) {
                    return null;
                }
                return l;
            },getPageX: function(l) {
                var k = l.pageX;
                if (!k && 0 !== k) {
                    k = l.clientX || 0;
                    if (this.isIE) {
                        k += this._getScrollLeft();
                    }
                }
                return k;
            },getPageY: function(k) {
                var l = k.pageY;
                if (!l && 0 !== l) {
                    l = k.clientY || 0;
                    if (this.isIE) {
                        l += this._getScrollTop();
                    }
                }
                return l;
            },getXY: function(k) {
                return [this.getPageX(k), this.getPageY(k)];
            },getRelatedTarget: function(l) {
                var k = l.relatedTarget;
                if (!k) {
                    if (l.type == "mouseout") {
                        k = l.toElement;
                    } else {
                        if (l.type == "mouseover") {
                            k = l.fromElement;
                        }
                    }
                }
                return this.resolveTextNode(k);
            },getTime: function(m) {
                if (!m.time) {
                    var l = new Date().getTime();
                    try {
                        m.time = l;
                    } catch (k) {
                        this.lastError = k;
                        return l;
                    }
                }
                return m.time;
            },stopEvent: function(k) {
                this.stopPropagation(k);
                this.preventDefault(k);
            },stopPropagation: function(k) {
                if (k.stopPropagation) {
                    k.stopPropagation();
                } else {
                    k.cancelBubble = true;
                }
            },preventDefault: function(k) {
                if (k.preventDefault) {
                    k.preventDefault();
                } else {
                    k.returnValue = false;
                }
            },getEvent: function(m, k) {
                var l = m || window.event;
                if (!l) {
                    var n = this.getEvent.caller;
                    while (n) {
                        l = n.arguments[0];
                        if (l && Event == l.constructor) {
                            break;
                        }
                        n = n.caller;
                    }
                }
                return l;
            },getCharCode: function(l) {
                var k = l.keyCode || l.charCode || 0;
                if (YAHOO.env.ua.webkit && (k in c)) {
                    k = c[k];
                }
                return k;
            },_getCacheIndex: function(n, q, r, p) {
                for (var o = 0, m = n.length; o < m; o = o + 1) {
                    var k = n[o];
                    if (k && k[this.FN] == p && k[this.EL] == q && k[this.TYPE] == r) {
                        return o;
                    }
                }
                return -1;
            },generateId: function(k) {
                var l = k.id;
                if (!l) {
                    l = "yuievtautoid-" + b;
                    ++b;
                    k.id = l;
                }
                return l;
            },_isValidCollection: function(l) {
                try {
                    return (l && typeof l !== "string" && l.length && !l.tagName && !l.alert && typeof l[0] !== "undefined");
                } catch (k) {
                    return false;
                }
            },elCache: {},getEl: function(k) {
                return (typeof k === "string") ? document.getElementById(k) : k;
            },clearCache: function() {
            },DOMReadyEvent: new YAHOO.util.CustomEvent("DOMReady", YAHOO, 0, 0, 1),_load: function(l) {
                if (!g) {
                    g = true;
                    var k = YAHOO.util.Event;
                    k._ready();
                    k._tryPreloadAttach();
                }
            },_ready: function(l) {
                var k = YAHOO.util.Event;
                if (!k.DOMReady) {
                    k.DOMReady = true;
                    k.DOMReadyEvent.fire();
                    k._simpleRemove(document, "DOMContentLoaded", k._ready);
                }
            },_tryPreloadAttach: function() {
                if (e.length === 0) {
                    a = 0;
                    if (this._interval) {
                        this._interval.cancel();
                        this._interval = null;
                    }
                    return;
                }
                if (this.locked) {
                    return;
                }
                if (this.isIE) {
                    if (!this.DOMReady) {
                        this.startInterval();
                        return;
                    }
                }
                this.locked = true;
                var q = !g;
                if (!q) {
                    q = (a > 0 && e.length > 0);
                }
                var p = [];
                var r = function(t, u) {
                    var s = t;
                    if (u.overrideContext) {
                        if (u.overrideContext === true) {
                            s = u.obj;
                        } else {
                            s = u.overrideContext;
                        }
                    }
                    u.fn.call(s, u.obj);
                };
                var l, k, o, n, m = [];
                for (l = 0, k = e.length; l < k; l = l + 1) {
                    o = e[l];
                    if (o) {
                        n = this.getEl(o.id);
                        if (n) {
                            if (o.checkReady) {
                                if (g || n.nextSibling || !q) {
                                    m.push(o);
                                    e[l] = null;
                                }
                            } else {
                                r(n, o);
                                e[l] = null;
                            }
                        } else {
                            p.push(o);
                        }
                    }
                }
                for (l = 0, k = m.length; l < k; l = l + 1) {
                    o = m[l];
                    r(this.getEl(o.id), o);
                }
                a--;
                if (q) {
                    for (l = e.length - 1; l > -1; l--) {
                        o = e[l];
                        if (!o || !o.id) {
                            e.splice(l, 1);
                        }
                    }
                    this.startInterval();
                } else {
                    if (this._interval) {
                        this._interval.cancel();
                        this._interval = null;
                    }
                }
                this.locked = false;
            },purgeElement: function(p, q, s) {
                var n = (YAHOO.lang.isString(p)) ? this.getEl(p) : p;
                var r = this.getListeners(n, s), o, k;
                if (r) {
                    for (o = r.length - 1; o > -1; o--) {
                        var m = r[o];
                        this.removeListener(n, m.type, m.fn);
                    }
                }
                if (q && n && n.childNodes) {
                    for (o = 0, k = n.childNodes.length; o < k; ++o) {
                        this.purgeElement(n.childNodes[o], q, s);
                    }
                }
            },getListeners: function(n, k) {
                var q = [], m;
                if (!k) {
                    m = [h, j];
                } else {
                    if (k === "unload") {
                        m = [j];
                    } else {
                        k = this._getType(k);
                        m = [h];
                    }
                }
                var s = (YAHOO.lang.isString(n)) ? this.getEl(n) : n;
                for (var p = 0; p < m.length; p = p + 1) {
                    var u = m[p];
                    if (u) {
                        for (var r = 0, t = u.length; r < t; ++r) {
                            var o = u[r];
                            if (o && o[this.EL] === s && (!k || k === o[this.TYPE])) {
                                q.push({type: o[this.TYPE],fn: o[this.FN],obj: o[this.OBJ],adjust: o[this.OVERRIDE],scope: o[this.ADJ_SCOPE],index: r});
                            }
                        }
                    }
                }
                return (q.length) ? q : null;
            },_unload: function(s) {
                var m = YAHOO.util.Event, p, o, n, r, q, t = j.slice(), k;
                for (p = 0, r = j.length; p < r; ++p) {
                    n = t[p];
                    if (n) {
                        try {
                            k = window;
                            if (n[m.ADJ_SCOPE]) {
                                if (n[m.ADJ_SCOPE] === true) {
                                    k = n[m.UNLOAD_OBJ];
                                } else {
                                    k = n[m.ADJ_SCOPE];
                                }
                            }
                            n[m.FN].call(k, m.getEvent(s, n[m.EL]), n[m.UNLOAD_OBJ]);
                        } catch (w) {
                        }
                        t[p] = null;
                    }
                }
                n = null;
                k = null;
                j = null;
                if (h) {
                    for (o = h.length - 1; o > -1; o--) {
                        n = h[o];
                        if (n) {
                            try {
                                m.removeListener(n[m.EL], n[m.TYPE], n[m.FN], o);
                            } catch (v) {
                            }
                        }
                    }
                    n = null;
                }
                try {
                    m._simpleRemove(window, "unload", m._unload);
                    m._simpleRemove(window, "load", m._load);
                } catch (u) {
                }
            },_getScrollLeft: function() {
                return this._getScroll()[1];
            },_getScrollTop: function() {
                return this._getScroll()[0];
            },_getScroll: function() {
                var k = document.documentElement, l = document.body;
                if (k && (k.scrollTop || k.scrollLeft)) {
                    return [k.scrollTop, k.scrollLeft];
                } else {
                    if (l) {
                        return [l.scrollTop, l.scrollLeft];
                    } else {
                        return [0, 0];
                    }
                }
            },regCE: function() {
            },_simpleAdd: function() {
                if (window.addEventListener) {
                    return function(m, n, l, k) {
                        m.addEventListener(n, l, (k));
                    };
                } else {
                    if (window.attachEvent) {
                        return function(m, n, l, k) {
                            m.attachEvent("on" + n, l);
                        };
                    } else {
                        return function() {
                        };
                    }
                }
            }(),_simpleRemove: function() {
                if (window.removeEventListener) {
                    return function(m, n, l, k) {
                        m.removeEventListener(n, l, (k));
                    };
                } else {
                    if (window.detachEvent) {
                        return function(l, m, k) {
                            l.detachEvent("on" + m, k);
                        };
                    } else {
                        return function() {
                        };
                    }
                }
            }()};
    }();
    (function() {
        var a = YAHOO.util.Event;
        a.on = a.addListener;
        a.onFocus = a.addFocusListener;
        a.onBlur = a.addBlurListener;
        /*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
        if (a.isIE) {
            if (self !== self.top) {
                document.onreadystatechange = function() {
                    if (document.readyState == "complete") {
                        document.onreadystatechange = null;
                        a._ready();
                    }
                };
            } else {
                YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach, YAHOO.util.Event, true);
                var b = document.createElement("p");
                a._dri = setInterval(function() {
                    try {
                        b.doScroll("left");
                        clearInterval(a._dri);
                        a._dri = null;
                        a._ready();
                        b = null;
                    } catch (c) {
                    }
                }, a.POLL_INTERVAL);
            }
        } else {
            if (a.webkit && a.webkit < 525) {
                a._dri = setInterval(function() {
                    var c = document.readyState;
                    if ("loaded" == c || "complete" == c) {
                        clearInterval(a._dri);
                        a._dri = null;
                        a._ready();
                    }
                }, a.POLL_INTERVAL);
            } else {
                a._simpleAdd(document, "DOMContentLoaded", a._ready);
            }
        }
        a._simpleAdd(window, "load", a._load);
        a._simpleAdd(window, "unload", a._unload);
        a._tryPreloadAttach();
    })();
}
YAHOO.util.EventProvider = function() {
};
YAHOO.util.EventProvider.prototype = {__yui_events: null,__yui_subscribers: null,subscribe: function(a, c, f, e) {
        this.__yui_events = this.__yui_events || {};
        var d = this.__yui_events[a];
        if (d) {
            d.subscribe(c, f, e);
        } else {
            this.__yui_subscribers = this.__yui_subscribers || {};
            var b = this.__yui_subscribers;
            if (!b[a]) {
                b[a] = [];
            }
            b[a].push({fn: c,obj: f,overrideContext: e});
        }
    },unsubscribe: function(c, e, g) {
        this.__yui_events = this.__yui_events || {};
        var a = this.__yui_events;
        if (c) {
            var f = a[c];
            if (f) {
                return f.unsubscribe(e, g);
            }
        } else {
            var b = true;
            for (var d in a) {
                if (YAHOO.lang.hasOwnProperty(a, d)) {
                    b = b && a[d].unsubscribe(e, g);
                }
            }
            return b;
        }
        return false;
    },unsubscribeAll: function(a) {
        return this.unsubscribe(a);
    },createEvent: function(b, g) {
        this.__yui_events = this.__yui_events || {};
        var e = g || {}, d = this.__yui_events, f;
        if (d[b]) {
        } else {
            f = new YAHOO.util.CustomEvent(b, e.scope || this, e.silent, YAHOO.util.CustomEvent.FLAT, e.fireOnce);
            d[b] = f;
            if (e.onSubscribeCallback) {
                f.subscribeEvent.subscribe(e.onSubscribeCallback);
            }
            this.__yui_subscribers = this.__yui_subscribers || {};
            var a = this.__yui_subscribers[b];
            if (a) {
                for (var c = 0; c < a.length; ++c) {
                    f.subscribe(a[c].fn, a[c].obj, a[c].overrideContext);
                }
            }
        }
        return d[b];
    },fireEvent: function(b) {
        this.__yui_events = this.__yui_events || {};
        var d = this.__yui_events[b];
        if (!d) {
            return null;
        }
        var a = [];
        for (var c = 1; c < arguments.length; ++c) {
            a.push(arguments[c]);
        }
        return d.fire.apply(d, a);
    },hasEvent: function(a) {
        if (this.__yui_events) {
            if (this.__yui_events[a]) {
                return true;
            }
        }
        return false;
    }};
(function() {
    var a = YAHOO.util.Event, c = YAHOO.lang;
    YAHOO.util.KeyListener = function(d, i, e, f) {
        if (!d) {
        } else {
            if (!i) {
            } else {
                if (!e) {
                }
            }
        }
        if (!f) {
            f = YAHOO.util.KeyListener.KEYDOWN;
        }
        var g = new YAHOO.util.CustomEvent("keyPressed");
        this.enabledEvent = new YAHOO.util.CustomEvent("enabled");
        this.disabledEvent = new YAHOO.util.CustomEvent("disabled");
        if (c.isString(d)) {
            d = document.getElementById(d);
        }
        if (c.isFunction(e)) {
            g.subscribe(e);
        } else {
            g.subscribe(e.fn, e.scope, e.correctScope);
        }
        function h(o, n) {
            if (!i.shift) {
                i.shift = false;
            }
            if (!i.alt) {
                i.alt = false;
            }
            if (!i.ctrl) {
                i.ctrl = false;
            }
            if (o.shiftKey == i.shift && o.altKey == i.alt && o.ctrlKey == i.ctrl) {
                var j, m = i.keys, l;
                if (YAHOO.lang.isArray(m)) {
                    for (var k = 0; k < m.length; k++) {
                        j = m[k];
                        l = a.getCharCode(o);
                        if (j == l) {
                            g.fire(l, o);
                            break;
                        }
                    }
                } else {
                    l = a.getCharCode(o);
                    if (m == l) {
                        g.fire(l, o);
                    }
                }
            }
        }
        this.enable = function() {
            if (!this.enabled) {
                a.on(d, f, h);
                this.enabledEvent.fire(i);
            }
            this.enabled = true;
        };
        this.disable = function() {
            if (this.enabled) {
                a.removeListener(d, f, h);
                this.disabledEvent.fire(i);
            }
            this.enabled = false;
        };
        this.toString = function() {
            return "KeyListener [" + i.keys + "] " + d.tagName + (d.id ? "[" + d.id + "]" : "");
        };
    };
    var b = YAHOO.util.KeyListener;
    b.KEYDOWN = "keydown";
    b.KEYUP = "keyup";
    b.KEY = {ALT: 18,BACK_SPACE: 8,CAPS_LOCK: 20,CONTROL: 17,DELETE: 46,DOWN: 40,END: 35,ENTER: 13,ESCAPE: 27,HOME: 36,LEFT: 37,META: 224,NUM_LOCK: 144,PAGE_DOWN: 34,PAGE_UP: 33,PAUSE: 19,PRINTSCREEN: 44,RIGHT: 39,SCROLL_LOCK: 145,SHIFT: 16,SPACE: 32,TAB: 9,UP: 38};
})();
YAHOO.register("event", YAHOO.util.Event, {version: "2.9.0",build: "2800"});
YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0",build: "2800"});

/**************************************************************************************



/mobile/common/js/lib/starwood/starwood.js



**************************************************************************************/
/**
 * this files creates the base namespace for all core starwood
 * code -"sw". In addtion, shortcuts are created into the YAHOO.util for ease of coding.
 * @author Danlan
 */

if (YAHOO.util) {
    /**
     * create shortcuts into YAHOO lib, allows for easer coding/readability.
     * some of the shortcuts: yuiDom, yuiEvent, yuiAnim, yuiEasing...
     * Same as var yuiDom = YAHOO.util.Dom;
     */
    for (var prop in YAHOO.util) {
        window["yui" + prop] = YAHOO.util[prop];
    }
    if (YAHOO.lang.JSON) {
        yuiJSON = YAHOO.lang.JSON;
    }
}
/**
 * create the base "sw" namespace for all core starwood code.
 */



$.namespace = function() {
    var a = arguments, o = null, i, j, d;
    for (i = 0; i < a.length; i = i + 1) {
        d = a[i].split(".");
        o = window;
        for (j = 0; j < d.length; j = j + 1) {
            o[d[j]] = o[d[j]] || {};
            o = o[d[j]];
        }
    }
    return o;
};

var SW = $.namespace("SW");

$.namespace("SW.tools"); // general utility objects and methods
$.namespace("SW.customEvent"); // custom event models
$.namespace("SW.widget"); // larger components
$.namespace("SW.domWidget"); // built in dom scrubbing to gain hooks widgets
$.namespace("SW.widget.virtualEarth"); // virtualEarth components
$.namespace("SW.flash"); // adaptors for Flash. When Flash needs to call JS, it uses this namespace. Local flash code should prefix component name with brand (ie SW.flash.SPGTour)
$.namespace("SW.local"); // namespace for any non-common code. All brand/page specific code resides here
$.namespace("SW.local.content"); // namespace
$.namespace("SW.maps"); //namespace for map related JS

/**************************************************************************************



/mobile/common/js/lib/starwood/core-extensions.js



**************************************************************************************/
/**
 * extensions to core JavaScript objects: Function, Array...
 */

/**
 * Class method for copying psuedo-arrays to *real* arrays, such
 * as function arguments and dom node collections (ie, document.getElementsByTagName("div"))
 * @param {Object} original array
 * @return {Array} new *real* array
 */
Array.Copy = function(original) {
    var i, result = [];
    for (i = 0; i < original.length; i++) {
        result.push(original[i]);
    }
    return result;
};
/**
 * alters the context in which a method will run, can be handy when used in conjunction with events
 * @param {Object} context for method to run (sets up the "this" reference)
 * @param... all additional parameters are passed to the bound method as parameters
 * @return {Function} invoking this function in any context will run the method in the correct context
 */
/*
  example:
  var myObject = {
    name:"fred"
  };
  function doTest(param1,param2){
    alert(this.name +'\n'+ param1 +'\n'+ param2);
  }
  var boundMethod = doTest.bind(myObject,"12","jane");
  boundMethod();
*/
/*
Function.prototype.bind = function(context) {
  var method = this;
  var args = Array.Copy(arguments);
  var obj = args.shift();
  return function() {
    return method.apply(obj, args);
  };
};
*/

// JavaScript 1.6 methods
if (!Array.forEach) {
    // perform action on each item of array - used in place of: for(i=0;i<myArray.length;i++) {...}
    /*
     example:
     var myArray = ['apple','banana','pear'];
     myArray.forEach(function(fruit){
     document.write(fruit);
     });
     */
    Array.prototype.forEach = function(fn, thisObj) {
        var i, j, scope = thisObj || window;
        for (i = 0, j = this.length; i < j; ++i) {
            fn.call(scope, this[i], i, this);
        }
    };
}
if (!Array.every) {
    // check if every item in array matches some criteria
    /*
     example:
     var myArray = [
     {name:'apple',type:'fruit'},
     {name:'steak',type:'meat'},
     {name:'pear',type:'fruit'}
     ];
     // returns false
     var allItemsAreFruits = myArray.every(function(food){
     return (food.type == "fruit");
     });
     */
    Array.prototype.every = function(fn, thisObj) {
        var i, j, scope = thisObj || window;
        for (i = 0, j = this.length; i < j; ++i) {
            if (!fn.call(scope, this[i], i, this)) {
                return false;
            }
        }
        return true;
    };
}
if (!Array.some) {
    // check if every item in array matches some criteria
    /*
     example:
     var myArray = [
     {name:'apple',type:'fruit'},
     {name:'steak',type:'meat'},
     {name:'pear',type:'fruit'}
     ];
     // returns true
     var someItemsAreFruits = myArray.some(function(food){
     return (food.type == "fruit");
     });
     */
    Array.prototype.some = function(fn, thisObj) {
        var i, j, scope = thisObj || window;
        for (i = 0, j = this.length; i < j; ++i) {
            if (fn.call(scope, this[i], i, this)) {
                return true;
            }
        }
        return false;
    };
}
if (!Array.map) {
    // create a new array based on contents of original array
    /*
     example:
     var myArray = [
     {name:'apple',type:'fruit'},
     {name:'steak',type:'meat'},
     {name:'pear',type:'fruit'}
     ];
     var arrayOfHtml = myArray.map(function(food){
     return "<div>"+ food.name +" ("+ food.type +")</div>";
     });
     */
    Array.prototype.map = function(fn, thisObj) {
        var i, j, scope = thisObj || window, 
        a = [];
        for (i = 0, j = this.length; i < j; ++i) {
            a.push(fn.call(scope, this[i], i, this));
        }
        return a;
    };
}
if (!Array.filter) {
    // create a new array of filtered results
    /*
     example:
     var myArray = [
     {name:'apple',type:'fruit'},
     {name:'steak',type:'meat'},
     {name:'pear',type:'fruit'}
     ];
     // returns true
     var fruits = myArray.map(function(food){
     return (food.type == "fruit");
     });
     */
    Array.prototype.filter = function(fn, thisObj) {
        var i, j, scope = thisObj || window, 
        a = [];
        for (i = 0, j = this.length; i < j; ++i) {
            if (!fn.call(scope, this[i], i, this)) {
                continue;
            }
            a.push(this[i]);
        }
        return a;
    };
}
if (!Array.indexOf) {
    // returns index of specified element (-1 if not found)
    Array.prototype.indexOf = function(el, start) {
        var i, j;
        start = start || 0;
        for (i = start, j = this.length; i < j; ++i) {
            if (this[i] === el) {
                return i;
            }
        }
        return -1;
    };
}
if (!Array.lastIndexOf) {
    // returns the last index of specified element (-1 if not found)
    Array.prototype.lastIndexOf = function(el, start) {
        var i;
        start = start || this.length;
        if (start >= this.length) {
            start = this.length;
        }
        if (start < 0) {
            start = this.length + start;
        }
        for (i = start; i >= 0; --i) {
            if (this[i] === el) {
                return i;
            }
        }
        return -1;
    };
}
// more useful array methods
// override commented out as it was conflicting with Bing Maps API
// found no usage of this method in whole codebase except swfAddress library which is 3rd party anyway
/* if(!Array.splice){
 Array.prototype.splice = function (iIndex , iLength ) {
 var i,aResult  = new Array();
 var aRemoved  = new Array();
 for (i=0; i < iIndex; i++){
 aResult.push(this[i]);
 }
 for (i=iIndex; i < iIndex+iLength; i++) {
 aRemoved.push(this[i]);
 }
 if (arguments.length > 2) {
 for (i=2; i < arguments.length; i++) {
 aResult.push(arguments[i]);
 }
 }
 for (i=iIndex+iLength; i < this.length; i++) {
 aResult.push(this[i]);
 }
 for (i=0; i < aResult.length; i++) {
 this[i] = aResult[i];
 }
 this.length = aResult.length;
 return aRemoved;
 }
 } */
if (!Array.remove) {
    Array.prototype.remove = function(vItem) {
        this.removeAt(this.indexOf(vItem));
        return vItem;
    };
}
if (!Array.removeAt) {
    Array.prototype.removeAt = function(iIndex) {
        var vItem = this[iIndex];
        if (vItem) {
            this.splice(iIndex, 1);
        }
        return vItem;
    };
}


// object/JSON sorting
(function() {
    // local object which creates comparator functions for sorting arrays of objects
    var Comparator = {
        cache: {},
        getComparator: function(array, criteria) {
            // if array is empty, we can exit now
            if (array.length == 0) {
                return function() {
                    return 0;
                }
            }
            // criteria are function arguments, need  to turn into 'real' array
            criteria = Array.Copy(criteria);
            var criteriaId = criteria.join();
            if (!Comparator.cache[criteriaId]) {
                // generate function
                // "new Function" is generally not a good idea, but actually provides the best for performance in this case
                var functionBody = [];
                var thisCriteria, i;
                functionBody.push("  var val = 0;");
                for (i = 0; i < criteria.length; i++) {
                    thisCriteria = criteria[i];
                    switch (typeof array[0][thisCriteria]) {
                        case "string":
                            functionBody.push("  val = (b." + thisCriteria + " < a." + thisCriteria + ") - (a." + thisCriteria + " < b." + thisCriteria + ");");
                            break;
                        case "number":
                            functionBody.push("  val = a." + thisCriteria + " -  b." + thisCriteria + ";");
                            break;
                        case "boolean":
                            functionBody.push("  val = (a." + thisCriteria + "*-1) -  (b." + thisCriteria + "*-1);");
                            break;
                    }
                    functionBody.push("  if (val != 0) {");
                    // look ahead for -1;
                    if (criteria[i + 1] === -1) {
                        functionBody.push("    return val * -1;");
                    } else {
                        functionBody.push("    return val;");
                    }
                    functionBody.push("  }");
                }
                functionBody.push("  return val;");
                Comparator.cache[criteriaId] = new Function("a", "b", functionBody.join("\n"));
            }
            return Comparator.cache[criteriaId];
        }
    };

    /**
        Object sorting (JSON sorting) method. To have a field use reverse order (DESC), make -1 the following parameter (see examples)
        Here is a sample objectSort call for DISTANCE sorting in SPG:
            searchResults.objectSort("isParticipating","favorite","distance","hasCash","cityName","propertyName");
        Simple example - for and array of people, sort by last name, then by first name
            people.sort("lsatName","firstName");
        Simple example - Sort people by age oldest to youngest, then by last name (a-z)
            people.sort("age",-1,"lastName");

    **/
    Array.prototype.objectSort = function() {
        // perform sort and return instance array
        this.sort(Comparator.getComparator(this, arguments));
        return this;
    };
})();

// object/JSON filtering
(function() {
    var FilterManager = {
        cache: {},
        getFilter: function(array, criteria) {
            if (array.length === 0 || criteria.length === 0) {
                return function() {
                    return true;
                };
            }
            var criteriaId = criteria.join();
            if (!FilterManager.cache[criteriaId]) {
                var functionBody = [], 
                conditions = [], 
                quoteChar = "", 
                thisField, thisValue, thisOperator, i, innerCondition, prefix, suffix;
                for (i = 0; i < criteria.length; i += 3) {
                    prefix = "";
                    suffix = "";
                    thisField = criteria[i];
                    thisValue = criteria[i + 1];
                    // if value is not an array, turn it into one
                    if (!(typeof thisValue == "object" && thisValue.length > 0)) {
                        thisValue = [thisValue];
                    }
                    thisOperator = criteria[i + 2];
                    quoteChar = (typeof array[0][thisField] == "string") ? "\"" : "";
                    switch (thisOperator) {
                        case "equals":
                            prefix = "item." + thisField + " == " + quoteChar;
                            suffix = quoteChar;
                            break;
                        case "notEquals":
                            prefix = "item." + thisField + " != " + quoteChar;
                            suffix = quoteChar;
                            break;
                        case "greaterThan":
                            prefix = "item." + thisField + " > " + quoteChar;
                            suffix = quoteChar;
                            break;
                        case "lessThan":
                            prefix = "item." + thisField + " < " + quoteChar;
                            suffix = quoteChar;
                            break;
                        case "greaterThanEquals":
                            prefix = "item." + thisField + " >= " + quoteChar;
                            suffix = quoteChar;
                            break;
                        case "lessThanEquals":
                            prefix = "item." + thisField + " <= " + quoteChar;
                            suffix = quoteChar;
                            break;
                        case "contains":
                            quoteChar = "\"";
                            prefix = "item." + thisField + ".indexOf(" + quoteChar;
                            suffix = quoteChar + ") > -1";
                            break;
                        default:
                            // if invalid operator passed, do not use this criteria
                            continue;
                    }
                    innerCondition = [];
                    thisValue.forEach(function(val) {
                        innerCondition.push(prefix + val + suffix);
                    });
                    conditions.push("(" + innerCondition.join(" ||  ") + ")");
                }
                functionBody.push("if( " + conditions.join(" && ") + "){");
                functionBody.push("  return true;");
                functionBody.push("}");
                functionBody.push("return false;");
                FilterManager.cache[criteriaId] = new Function("item", functionBody.join("\n"));
            
            }
            return FilterManager.cache[criteriaId];
        }
    };
    
    Array.prototype.setFilter = function(field, value, operator) {
        // first time calling setFilter, setup objects and methods
        var criteria = [], 
        thisArray = this;
        thisArray.setFilter = function(field, value, operator) {
            if (arguments.length === 0) {
                criteria.length = 0;
                return thisArray;
            }
            operator = operator || "equals";
            criteria.push(field, value, operator);
            return thisArray;
        };
        thisArray.objectFilter = function() {
            var result = thisArray.filter(FilterManager.getFilter(thisArray, criteria));
            criteria.length = 0;
            return result;
        };

        // set this filter criteria and return array (note - this code only runs first time setFilter is called)
        thisArray.setFilter(field, value, operator);
        return thisArray;
    };
    // dummy placeholder method... here just in case objectFilter is called before setFilter
    Array.prototype.objectFilter = function() {
        // behave like normal, return copy of this array
        return Array.Copy(this);
    };
})();

/**************************************************************************************



/common/js/lib/starwood/tools.js



**************************************************************************************/
/**
 * The utilities.js file provides additional functions, many built on top of yahoo
 * @module starwood utilities
 * @requires yahoo-dom-event
 */


// can be used in place of window.onload or yuiEvent.addListener(window,"load",...).
// In theory, this fires when the closing body tag is drawn (before window.onload).

/**
 * @deprecated
 * @param String url
 * @param String param
 * @param String val
 * @return String
 */
SW.tools.setUrlParameter = function(url, param, val) {
    return SW.tools.Url.setParameter(url, param, val);
}
SW.tools.Url = {
    /**
     * used to add or change value of parameter in url
     * var url = SW.tools.setUrlParamter(document.location.href,"propID",mySelect.value);
     * @param url
     * @param param
     * @param val
     * @return String
     */
    setParameter: function(url, param, val) {
        var curPairs;
        var paramPair;
        var hashString = "";
        if (url.indexOf("#") > -1) {
            hashString = url.substr(url.indexOf("#") + 1);
            url = url.substring(0, url.indexOf("#"));
        }
        var allPairs = [];
        var urlParts = url.split('?');
        
        if (urlParts.length > 1) {
            curPairs = urlParts[1].split('&');
            curPairs.forEach(function(paramPair) {
                var paramParts = paramPair.split('=');
                if (paramParts[0] != param) {
                    allPairs.push(paramParts[0] + '=' + (typeof paramParts[1] != "undefined" ? paramParts[1] : ''));
                }
            });
        }
        if (val !== null && typeof val !== 'undefined') {
            allPairs.push(param + '=' + val);
        }
        return urlParts[0] + '?' + allPairs.join('&') + (hashString ? "#" + hashString : "");
    
    },
    getParameter: function(url, param) {
        var i, urlParts, curPairs, paramParts;
        if (url.indexOf("#") > -1) {
            url = url.substring(0, url.indexOf("#"));
        }
        urlParts = url.split('?');
        if (urlParts.length > 1) {
            curPairs = urlParts[1].split('&');
            for (i = 0; i < curPairs.length; i++) {
                paramPair = curPairs[i];
                paramParts = paramPair.split('=');
                if (paramParts[0] === param) {
                    return paramParts[1];
                }
            }
        }
        return null;
    },
    getHash: function(url) {
        if (url.indexOf("#") > -1) {
            return url.substring(url.indexOf("#") + 1);
        }
        return "";
    }
};
/**
 * add to img tags which are using [semi]transparent png's to fix IE6 issue
 * This is only way to avoid *ALL* IE6 issues! (including browser freezing/locking up)
 * sample:
 *      <img src="/path/to/myImage.png" width="233" height="82" onload="SW.tools.iePNGLoader(this);" />
 * @param img
 */
SW.tools.iePNGLoader = function(img) {
    var ieVersion = navigator.appVersion.split("MSIE");
    if (navigator.userAgent.indexOf("MSIE") > -1 && parseInt(ieVersion[1]) <= 6) {
        var pSrc = img.src;
        img.onload = null;
        img.src = "/common/images/shim.gif";
        img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='" + pSrc + "')";
    }
}

// Begin Code from YUI: Colorpicker
var HCHARS = "0123456789ABCDEF";
/**
 * Converts decimal rgb values into a hex string
 * 255,255,255 -> FFFFFF
 * @method rgb2hex
 * @param r {int|[int, int, int]} the red value, or an
 *        array containing all three parameters
 * @param g {int} the green value
 * @param b {int} the blue value
 * @return {string} the hex string
 */
SW.tools.rgb2hex = function(r, g, b) {
    var f = this.dec2hex;
    return f(r) + f(g) + f(b);
};

/**
 * Converts an int 0...255 to hex pair 00...FF
 * @method dec2hex
 * @param n {int} the number to convert
 * @return {string} the hex equivalent
 */
SW.tools.dec2hex = function(n) {
    n = parseInt(n, 10);
    n = (n > 255 || n < 0) ? 0 : n;
    
    return HCHARS.charAt((n - n % 16) / 16) + HCHARS.charAt(n % 16);
};
// End code from YUI: Colorpicker



// used in conjunction with secure json calls
// new yuiConnect( secureJsonUrl("/path/to/myData.jsp?someID=45") );
SW.tools.secureJsonUrl = function(url) {
    return SW.tools.Url.setParameter(url, "_jsk", SW.Cookie.get("JSESSIONID"));
}

/*
### set cookie ###
  --> set basic session cookie
    SW.tools.Cookie.set("sid","somevalue");

  --> set permanent cookie
    SW.tools.Cookie.set("sid","somevalue","NEVER");

  --> set cookie to expire sometime in the future
    var exDate = new Date();
    expires.setMonth(expires.getMonth()+1);
    SW.tools.Cookie.set("sid","somevalue",expires);

### get cookie ###
  --> get value of cookie
    SW.tools.Cookie.get("sid");
    
### remove cookie ###
  --> remove cookie
    SW.tools.Cookie.remove("sid");
*/
SW.tools.Cookie = {
    values: [],
    loaded: false,
    set: function(name, value, expires, path, domain, secure) {
        var cookieValue = new Array();
        cookieValue.push(name + "=" + escape(value));
        if (typeof expires != "undefined") {
            if (typeof expires == "string") {
                if (expires.toUpperCase() == "NEVER") {
                    expires = new Date();
                    expires.setFullYear(expires.getFullYear() + 10);
                } else if (expires.toUpperCase() == "REMOVE") {
                    expires = new Date();
                    expires.setFullYear(expires.getFullYear() - 1);
                }
            }
            cookieValue.push("expires=" + expires.toGMTString());
        }
        if (typeof path == "undefined") {
            path = "/";
        }
        cookieValue.push("path=" + path);
        if (typeof domain != "undefined") {
            cookieValue.push("domain=" + domain);
        }
        if (secure) {
            cookieValue.push("secure");
        }
        document.cookie = cookieValue.join("; ");
        SW.tools.Cookie.loaded = false;
    },
    get: function(name) {
        if (!SW.tools.Cookie.loaded) {
            SW.tools.Cookie._readCookie();
        }
        ;
        for (var i = 0; i < SW.tools.Cookie.values.length; i++) {
            if (SW.tools.Cookie.values[i].name == name) {
                return SW.tools.Cookie.values[i].value;
            }
            ;
        }
        return "";
    },
    remove: function(name) {
        SW.tools.Cookie.set(name, "", "REMOVE");
    },
    // internal method
    _readCookie: function() {
        var cookieString = document.cookie;
        var paramPairs = cookieString.split("; ");
        var i, splitPair;
        SW.tools.Cookie.values = [];
        for (i = 0; i < paramPairs.length; i++) {
            splitPair = paramPairs[i].split("=");
            if (splitPair.length == 2) {
                SW.tools.Cookie.values.push({
                    name: unescape(splitPair[0]),
                    value: unescape(splitPair[1])
                });
            }
        }
        ;
        SW.tools.Cookie.loaded = true;
    }
};

SW.tools.getSkinName = function() {
    return document.location.pathname.split("/")[1];
};

SW.tools.Xml = {
    /**
     *
     * @param node - reference to parent node
     * @param tagname - tagname for which you want to get it's "innerText"
     * @return String
     */
    getSubNodeText: function(node, tagname) {
        var returnValue;
        subNode = node.getElementsByTagName(tagname);
        if (subNode[0] != null) {
            returnValue = subNode[0].textContent || subNode[0].text;
            if (typeof returnValue == 'undefined' && subNode[0].firstChild) {
                returnValue = subNode[0].firstChild.nodeValue;
            }
        }
        if (!returnValue) {
            returnValue = "";
        }
        return returnValue;
    }
};

// helper methods to scrub html for data (taken from results.js - consider making common version)

SW.tools.Html = (function() {
    var yuiDom = YAHOO.util.Dom, 
    yuiLang = YAHOO.lang;
    
    function dataToType(data, type, defaultVal) {
        var val = defaultVal;
        switch (type) {
            case "string":
                val = (data === "") ? defaultVal : data;
                break;
            case "array":
                if (data === "") {
                    val = defaultVal;
                } else {
                    val = data.split(",");
                }
                break;
            case "boolean":
                val = (data === "true") ? true : defaultVal;
                break;
            case "float":
                val = parseFloat(data);
                if (isNaN(val)) {
                    val = defaultVal;
                }
                break;
            case "int":
                val = parseInt(data, 10);
                if (isNaN(val)) {
                    val = defaultVal;
                }
                break;
            default:
                break;
        }
        return val;
    }
    var self = {
        getDataFromInput: function(root, className, type, defaultVal) {
            var input = yuiDom.getElementsByClassName(className, "input", root);
            var val = defaultVal;
            if (input && input[0]) {
                val = dataToType(input[0].value, type, defaultVal);
            }
            return val;
        },
        getDataFromTag: function(root, tagName, className, type, defaultVal) {
            var result = yuiDom.getElementsByClassName(className, tagName, root);
            var val = defaultVal;
            if (result && result[0]) {
                val = dataToType(yuiLang.trim(result[0].innerHTML), type, defaultVal);
            }
            return val;
        },
        getClearDiv: function() {
            var div = document.createElement("div");
            yuiDom.addClass(div, "clearDiv");
            return div;
        },
        appendClearDiv: function(parentNode) {
            parentNode.appendChild(self.getClearDiv());
        },
        getGreyOutDiv: function() {
            var div = document.createElement("div");
            yuiDom.addClass(div, "greyOutDiv");
            return div;
        },
        appendGreyOutDiv: function(parentNode) {
            parentNode.appendChild(self.getGreyOutDiv());
        }
    };
    return self;
})();


/**
 * utility for handling body clicks during capture phase (only works in ie > 8). This gives ability to
 * preventDefault/stopPropagation before the standard bubbling phase events are triggered. This was initially created to
 * work with semi-modal layers (layers which take focus but do not gray out the background), to allow the layer to be
 * close when clicking anywhere outside of the panel (which could include anchor tags)
 * @param func
 */
SW.tools.captureEvent = function(func) {
    var bodyEle = document.body;
    if (bodyEle.addEventListener) {
        bodyEle.addEventListener("click", func, true);
    } else if (bodyEle.attachEvent) {
        document.attachEvent("onclick", function() {
            var event = window.event;
            event.target = event.srcElement;
            event.preventDefault = function() {
                event.returnValue = false;
            };
            event.stopPropagation = function() {
            };
            func(event);
        });
    }
};

/**************************************************************************************



/common/js/calendar/calendarHelper.js



**************************************************************************************/
function getFormatedDate(local, theDate) {
    
    var sDateFormat = "";
    
    
    
    var sTheMonth = theDate.getMonth() + 1;
    
    sTheMonth = ((sTheMonth) <= 9) ? "0" + sTheMonth : sTheMonth;
    
    
    
    var sTheDay = theDate.getDate();
    
    sTheDay = (sTheDay <= 9) ? "0" + sTheDay : sTheDay;
    
    var nTheYear = theDate.getFullYear();
    
    
    
    
    
    if (local == "ja" || local == "zh") {

        // FORMAT: YYYY/MM/DD

        //sDateFormat = nTheYear + "/" + sTheMonth + "/" + sTheDay;
        sDateFormat = String(nTheYear).substr(2, 2) + "\u5E74" + sTheMonth + "\u6708" + sTheDay + "\u65E5";
    
    } 
    else if (local == "ko") {
        sDateFormat = String(nTheYear).substr(2, 2) + "\uB144" + sTheMonth + "\uC6D4" + sTheDay + "\uC77C";
    } 
    else if ((local == "es") || (local == "fr") || (local == "it") || (local == "pt") || (local == "ar") || (local == "nl") || (local == "tr")) {

        // FORMAT: DD/MM/YYYY
        
        sDateFormat = sTheDay + "/" + sTheMonth + "/" + nTheYear;
    
    } else if (local == "de" || local == "ru" || local == "pl") {
        sDateFormat = sTheDay + "." + sTheMonth + "." + nTheYear;
    } else {
        // FORMAT: MM/DD/YYYY
        
        sDateFormat = sTheMonth + "/" + sTheDay + "/" + nTheYear;
    
    }
    
    return sDateFormat;

}



function setDateFromString(local, theDate) {
    if (local.length > 2) {
        local = local.split("_")[0];
    }
    var theDateObject = null;
    var theDateArray = theDate.split("/");
    if (local == "ja" || local == "zh" || local == "ko") {
        // FORMAT: YYYY/MM/DD
        theDateArray = theDate.split(" ");
        //theDateObject = new Date(theDateArray[0].substr(0,4), theDateArray[1].substr(0,2)-1, theDateArray[2].substr(0,2));
        if (theDate != "") {
            theDateObject = new Date("20" + theDate.substr(0, 2), theDate.substr(3, 2) - 1, theDate.substr(6, 2));
        }
    } else if ((local == "es") || (local == "fr") || (local == "it") || (local == "pt") || (local == "ar") || (local == "nl") || (local == "tr")) {
        // FORMAT: DD/MM/YYYY
        theDateObject = new Date(theDateArray[2], theDateArray[1] - 1, theDateArray[0]);
    } else if (local == "de" || local == "ru" || local == "pl") {
        theDateArray = theDate.split(".");
        theDateObject = new Date(theDateArray[2], theDateArray[1] - 1, theDateArray[0]);
    } else {
        // FORMAT: MM/DD/YYYY
        theDateObject = new Date(theDateArray[2], theDateArray[0] - 1, theDateArray[1]);
    }
    //alert("theDateObject: " + theDateObject);
    if ((theDateObject == "Invalid Date") || (isNaN(theDateObject))) {
        theDateObject = null;
    }
    return theDateObject;
}



/*

This function is necessary because as of now the multiDisplayCalendar.js needs an empty form to process the curent dates

*/

function fnClearFormField(pDate) {
    
    if ((pDate == "MM/DD/YYYY") || (pDate == "DD/MM/YYYY") || (pDate == "DD/MM/AAAA") || (pDate == "JJ/MM/AAAA") || (pDate == "GG/MM/AAAA") 
    || (pDate == "TT.MM.JJJJ") || (pDate = "YY\u5E74MM\u6708DD\u65E5") || (pDate = "YY\uB144MM\uC6D4DD\uC77C") || (pDate = "\u0414\u0414.\u041c\u041c.\u0413\u0413\u0413\u0413") 
    || (pDate == "DD/MM/JJJJ") || (pDate == "DD/MM/RRRR") || (pDate == "GG/AA/YYYY")) {
        pDate = "";
    }
    return pDate;
}

function fnGetDisplayDate(pDateToFormat) {
    var lsFormatDate = null;
    if (pDateToFormat) {
        var loDate = new Date(pDateToFormat);
        //var lsYear = loDate.getFullYear().toString().substring(2,4);
        var lsYear = loDate.getFullYear();
        var lsMonth = moLanguageObj.calendarShortMonthArray[loDate.getMonth()]
        lsFormatDate = loDate.getDate() + ' ' + lsMonth + ' ' + lsYear;
    }
    return lsFormatDate;
}

function padZero(pNumber) {
    return (pNumber < 0 || pNumber > 9 ? "" : "0") + pNumber;
}

function fnGetDateDifference(pCIDay, pCODay) {
    var loStartDate = new Date(pCIDay);
    var loEndDate = new Date(pCODay);
    var lnDayDiff = Math.round((loEndDate.getTime() - loStartDate.getTime()) / (1000 * 60 * 60 * 24));
    return Math.abs(lnDayDiff);
}


/**************************************************************************************



/mobile/common/js/global/webForm.js



**************************************************************************************/
function WebForm() {
    var self = this;
    this.errors = new Array();
    this.addError = function(_x, _y, _z, _a, _b) {
        for (i = 0; i < arguments.length; i++) {
            if (arguments[i] != null) {
                self.errors[self.errors.length] = new error(arguments[i]);
            
            }
        }
    
    }
    this.hasErrors = function() {
        return (self.errors.length != 0);
    }
    this.resetErrors = function() {
        for (i = 0; i < self.errors.length; i++) {
            self.errors[i].handle("reset");
        }
        self.errors = new Array();
    }
    this.showErrors = function() {
        for (i = 0; i < self.errors.length; i++) {
            self.errors[i].handle();
        }
        if ((typeof s != 'undefined') && (typeof s.prop11 != 'undefined')) {
            var s_prop11 = s.prop11;
            s.prop11 += 'Error';
            setOmniVars(s.charSet, s.server, s.channel, s.prop2, s.prop3, s.prop1, "", s.prop11);
            var s_code = s.t();
            s.prop11 = s_prop11;
        }
    }
    function error(_x) {
        var self = this;
        var errorCode;
        self.errorCode = _x;
        this.handle = function(reset) {
            set = (reset == null) ? reset = false : reset = true;
            handleDisplay(self.errorCode, set);
        }
        return this;
    }
    this.collapseErrors = function(errorCode) {
        var count = 0;
        for (i = 0; i < self.errors.length; i++) {
            if (self.errors[i].errorCode.charAt(0) == "~") {
                count++;
            }
        }
        if (count > 1) {
            for (i = 0; i < self.errors.length; i++) {
                if (self.errors[i].errorCode.charAt(0) == "~") {
                    self.errors[i].errorCode = null;
                }
            }
            self.errors[self.errors.length] = new error(errorCode);
        }
    }
}

function handleDisplay(_obj, reset) {
    if (_obj != null) {
        if (_obj.charAt(0) == "~") {
            _obj = _obj.substring(1);
        }
        if (_obj.charAt(0) == "!") {
            reset = !reset;
            _obj = _obj.substring(1);
        }
        var obj = document.getElementById(_obj);
        if (obj) {
            if (obj.tagName == "LABEL" || obj.tagName == "SELECT" || obj.tagName == "INPUT") {
                obj.className = reset ? "" : "error";
            } else {
                obj.style.display = reset ? "none" : "";
            }
        }
    }
}

function display(obj, state) {
    if (document.getElementById(obj)) {
        document.getElementById(obj).style.display = state;
    }
}

function validDate(_field, dateFormat) {
    var self = this, 
    field, 
    d, 
    _s, 
    _d, 
    getDate = true;
    
    if (typeof dateFormat != "undefined") {
        dateFormatString = dateFormat;
    }
    
    field = _field;
    _s = field.value;
    
    _d = getDateFromField(field, dateFormatString);
    this.valid = true;
    // safari will not return true for isNaN check even when the date is initialized with day = dd, month = mm, and year = yyyy
    if (isNaN(_d.getDate()) || (field.value.toLowerCase() == dateFormatString.toLowerCase())) { // Basically, this allows the functions to gracefully return to the format string instead of putting a date in the field.
        this.valid = false;
    }
    
    this.d = _d;
    this.setField = function() {
        writeDateToField(field, this.d, dateFormatString);
    };
    this.setD = function(_d) {
        self.d = _d
    };
    this.nextDay = function() {
        return this.d.setDate(self.d.getDate() + 1);
    };
    this.diffDate = function(dd) {
        return Math.round((makeDate(dd).getTime() - makeDate(self.d).getTime()) / (1000 * 60 * 60 * 24));
    };
    function makeDate(md) {
        return new Date(fixYear(md.getYear()), md.getMonth(), md.getDate());
    }
    return this;
}

function fixYear(_y) {
    var y = (_y + 10000) % 100;
    y += (y < 38) ? 2000 : 1900;
    return y
}

function isValidEmail(field) {
    if (field != null && field != '') {
        field = stripCharsInBag(field, ' ')
        //        var regexp = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/; (oldone)
        var regexp = /^\w+((-\w+)|(\`\w+)|(\.\w+)|('\w+)|(\+\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
        return (field.search(regexp) != -1);
    }
}

function doesUserNameContainHyphen(field) {
    var regExp = /-/;
    return (field.search(regExp) != -1)
}

function isValidZip(field, country) {
    if (field != '' && field != null && country != '' && country != null) {
        if (country == 'US') {
            var regExp = /(^\d{5}$)|(^\d{5}-\d{4}$)/;
            return (field.search(regExp) != -1)
        } else if (country == 'CA') {
            v = stripCharsInBag(field, "- ");
            var regexp = /^[A-Va-v]|[X,Y,x,y]\d[A-Za-z]\d[A-Za-z]\d$/;
            return (v.length == 6 && !hasChars(v, 'D', 'F', 'I', 'O', 'Q', 'U') && v.search(regexp) != -1)
        }
    }
}

function isUSCanZip(zip, country) {
    if (zip != '' && zip != null)
        return (country == 'US' || country == 'CA');
}

function isValidPhone(phone, country) {
    if (phone != null && phone != '' && country != null && country != '') {
        return (country == 'US' && isUSPhoneNumber(phone)) || (country != 'US' && isInternationalPhoneNumber(phone));
    }
    return true;
}

function isValidName(field) {
    var regExp = /[0-9]/;
    if (field != null && field != '')
        return (field.search(regExp) != -1);
}

function isUSPhoneNumber(s) {
    var phoneNumberDelimiters = "+.,()-xX# ";
    var digitsInUSPhoneNumber = 15; // allow 10 digits + 1- prefix (i.e +1 digit) + extension # (i.e +4 digits)
    var minDigitsInUSPhoneNumber = 10;
    s1 = stripCharsInBag(s, phoneNumberDelimiters);
    return (isInteger(s1) && (s1.length <= digitsInUSPhoneNumber && s1.length >= minDigitsInUSPhoneNumber));
}

function isInternationalPhoneNumber(s) {
    var phoneNumberDelimiters = "+.,()-xX# ";
    s1 = stripCharsInBag(s, phoneNumberDelimiters);
    return (isInteger(s1));
}

function isValidSPGNum(field) {
    if (field != null && field != '') {
        // one optional letter + any number of digits + zero or more whitespace chars at the beginning and at the end
        var re = /^\s*[A-Za-z0-9]\d+\s*$/;
        if (field != null && field != '') {
            return (field.search(re) != -1);
        }
    }
}

function parseDate(_s) {
    try {
        d = Date.parse(_s);
        return d;
    } catch (err) {
        var dateArray = _s.split("/");
        var tempMonth = parseInt(dateArray[0], 10);
        var tempDay = parseInt(dateArray[1], 10);
        var tempYear = parseInt(dateArray[2], 10);
        d = new Date(tempYear, (tempMonth - 1), tempDay);
        return d;
    }
}

//--------------------------------------------------------
//Get the Date from a form field - Based on Internationalization Variables
//--------------------------------------------------------
function getDateFromField(formField, dateFormat) {
    // formField is a reference to a text field
    // dateFormat is a string describing the local date format
    //	Current options for dateFormat:
    //		mm/dd/yyyy - English
    //		dd/mm/yyyy - Non-English, Non-Japanese
    //		yyyy/mm/dd - Japanese, Chinese
    //		dd.mm.yyyy - German
    //		dd-mm-yyyy - For generic format
    
    var dataToday = typeof formField == "object" ? formField.getAttribute("data-today") : null;
    var date = SW.widget.Calendar.Utils.getToday(dataToday); // Default the date to today ready to be overwritten.
    var currDate = SW.widget.Calendar.Utils.getToday(dataToday); // Today's date and time for comparison's sake.
    
    
    dateFormat = dateFormat.toLowerCase();
    var fieldString;
    var hasSlashOrDash = false;
    if (typeof formField == "object") {
        fieldString = formField.value;
    }  // Get the current value of the field
    else {
        fieldString = formField;
    } // We were passed a direct value
    if (fieldString.search("/") > 0) { // check if we have / to delimit
        var dateValues = fieldString.split("/");
        hasSlashOrDash = true;
    } else if (fieldString.search("-") > 0) { // They used - instead of /
        var dateValues = fieldString.split("-");
        hasSlashOrDash = true;
    } else if (fieldString.indexOf(".") >= 0) { // They used . instead of /
        var dateValues = fieldString.split(".");
    } else if (fieldString != "") { // Assume there are no delimiters, assume one number
        var dateValues = new Array(fieldString);
    } else if (fieldString == "") { // If there's not data there, assume it was deleted, and throw back a validDate object compatible invalid date.
        date.setTime(Date.parse(dateFormatString));
        return date;
    }
    
    if (fieldString.toLowerCase() == dateFormatString) {
        date.setTime(Date.parse(fieldString));
        return date;
    }
    
    var year;
    var month;
    var day;
    switch (dateFormat) {
        case 'mm/dd/yyyy':
            if (dateValues[0])
                month = dateValues[0];
            if (dateValues[1])
                day = dateValues[1];
            if (dateValues[2])
                year = dateValues[2];
            break;
        case 'dd/mm/aaaa':
        case 'jj/mm/aaaa':
        case 'gg/mm/aaaa':
        case 'tt.mm.jjjj':
        case 'dd/mm/jjjj':
        case 'dd.mm.rrrr':
        case 'gg/aa/yyyy':
            if (dateValues[0])
                day = dateValues[0];
            if (dateValues[1])
                month = dateValues[1];
            if (dateValues[2])
                year = dateValues[2];
            break;
        case 'yyyy/mm/dd':
            if (dateValues[0])
                year = dateValues[0];
            if (dateValues[1])
                month = dateValues[1];
            if (dateValues[2])
                day = dateValues[2];
            break;
        case 'yyyy/dd/mm':
            if (dateValues[0])
                year = dateValues[0];
            if (dateValues[1])
                day = dateValues[1];
            if (dateValues[2])
                month = dateValues[2];
            break;
        case 'dd.mm.yyyy':
        case 'dd/mm/yyyy':
            if (dateValues[0])
                day = dateValues[0];
            if (dateValues[1])
                month = dateValues[1];
            if (dateValues[2])
                year = dateValues[2];
            break;
        case '\u0434\u0434.\u043c\u043c.\u0433\u0433\u0433\u0433':
            if (dateValues[0])
                day = dateValues[0];
            if (dateValues[1])
                month = dateValues[1];
            if (dateValues[2])
                year = dateValues[2];
            break;
        case "yy\u5E74mm\u6708dd\u65E5":
            if (!hasSlashOrDash) {
                //dateValues = fieldString.split(" ");
                year = fieldString.substr(0, 2);
                month = fieldString.substr(3, 2);
                day = fieldString.substr(6, 2);
            } else {
                if (dateValues[0])
                    year = dateValues[0];
                if (dateValues[1])
                    month = dateValues[1];
                if (dateValues[2])
                    day = dateValues[2];
            }
            break;
        case "yy\uB144mm\uC6D4dd\uC77C":
            if (!hasSlashOrDash) {
                //dateValues = fieldString.split(" ");
                year = fieldString.substr(0, 2);
                month = fieldString.substr(3, 2);
                day = fieldString.substr(6, 2);
            } else {
                if (dateValues[0])
                    year = dateValues[0];
                if (dateValues[1])
                    month = dateValues[1];
                if (dateValues[2])
                    day = dateValues[2];
            }
            break;
        default: // Default to mm/dd/yyyy
            if (dateValues[0])
                month = dateValues[0];
            if (dateValues[1])
                day = dateValues[1];
            if (dateValues[2])
                year = dateValues[2];
            break;
    }
    if (year) {
        if (year.length == 2) {
            year = "20" + year;
        } // Try to make the year 4 digits
        if (year.length == 4) { // If it's not 4 digits, just fall back to using the current year
            date.setFullYear(year);
        }
    }
    date.setDate(1);
    if (month)
        date.setMonth(month - 1); // setMonth uses a zero-based number
    if (day)
        date.setDate(day);
    if (date.getTime() < currDate.getTime())
        date.setYear(currDate.getFullYear() + 1); // For dates in the past, set to next year.
    // safari will not return true for isNaN check even when the date is initialized with day = dd, month = mm, and year = yyyy
    if (isNaN(month) && isNaN(day) && isNaN(year)) {
        if (!isNaN(date.getDate())) {
            date = {
                getDate: function() {
                    return NaN;
                }
            }
        }
    }
    writeDateToField(formField, date, dateFormat);
    return date;
}

//--------------------------------------------------------
//Write the date to a form field - Based on Internationalization Variables
//--------------------------------------------------------

function writeDateToField(formField, date, dateFormat) {
    // prevent "undefined" string from showing
    var dateString = "";
    if (isNaN(date.getDate())) {
        formField.value = dateString;
        return;
    }
    
    dateFormat = dateFormat.toLowerCase();
    var month = date.getMonth() + 1;
    month = paddZero(month);
    var day = date.getDate();
    day = paddZero(day);
    var year = date.getFullYear();
    var sep = "/";
    var dot = ".";
    var dash = "-";
    switch (dateFormat) {
        case 'mm/dd/yyyy':
            dateString = month + sep + day + sep + year;
            break;
        case 'dd/mm/yyyy':
            dateString = day + sep + month + sep + year;
            break;
        case 'dd/mm/aaaa':
        case 'jj/mm/aaaa':
        case 'gg/mm/aaaa':
        case 'dd/mm/jjjj':
        case 'gg/aa/yyyy':
            dateString = day + sep + month + sep + year;
            break;
        case 'tt.mm.jjjj':
        case 'dd.mm.rrrr':
            dateString = day + dot + month + dot + year;
            break;
        case 'yyyy/mm/dd':
            dateString = year + sep + month + sep + day;
            break;
        case 'yyyy/dd/mm':
            dateString = year + sep + day + sep + month;
            break;
        case 'yyyy-mm-dd':
            dateString = year + dash + day + dash + month;
            break;
        case "yy\u5E74mm\u6708dd\u65E5":
            dateString = String(year).substr(2, 2) + "\u5E74" + month + "\u6708" + day + "\u65E5";
            break;
        case "yy\uB144mm\uC6D4dd\uC77C":
            dateString = String(year).substr(2, 2) + "\uB144" + month + "\uC6D4" + day + "\uC77C";
            break;
        case "\u0434\u0434.\u043c\u043c.\u0433\u0433\u0433\u0433":
            dateString = day + dot + month + dot + year;
            break;
        default: // Default to mm/dd/yyyy
            dateString = month + sep + day + sep + year;
            break;
    }
    
    formField.value = dateString;
}


var defaultDateFrmt = "yyyy-mm-dd";

function getDefaultDateFormat(formField, defaultDateFormat) {
    var date = getDateFromField(formField, dateFormatString);
    // prevent "undefined" string from showing
    var dateString = "";
    defaultDateFormat = defaultDateFormat.toLowerCase();
    var month = date.getMonth() + 1;
    month = paddZero(month);
    var day = date.getDate();
    day = paddZero(day);
    var year = date.getFullYear();
    var sep = "/";
    var dot = ".";
    var dash = "-";
    switch (defaultDateFormat) {
        case 'mm/dd/yyyy':
            dateString = month + sep + day + sep + year;
            break;
        case 'dd/mm/yyyy':
            dateString = day + sep + month + sep + year;
            break;
        case 'dd/mm/aaaa':
        case 'jj/mm/aaaa':
        case 'gg/mm/aaaa':
        case 'dd/mm/jjjj':
        case 'gg/aa/yyyy':
            dateString = day + sep + month + sep + year;
            break;
        case 'tt.mm.jjjj':
        case 'dd.mm.rrrr':
            dateString = day + dot + month + dot + year;
            break;
        case 'yyyy/mm/dd':
            dateString = year + sep + month + sep + day;
            break;
        case 'yyyy/dd/mm':
            dateString = year + sep + day + sep + month;
            break;
        case 'yyyy-mm-dd':
            dateString = year + dash + month + dash + day;
            break;
        case "yy\u5E74mm\u6708dd\u65E5":
            dateString = String(year).substr(2, 2) + "\u5E74" + month + "\u6708" + day + "\u65E5";
            break;
        case "yy\uB144mm\uC6D4dd\uC77C":
            dateString = String(year).substr(2, 2) + "\uB144" + month + "\uC6D4" + day + "\uC77C";
            break;
        case "\u0434\u0434.\u043c\u043c.\u0433\u0433\u0433\u0433":
            dateString = day + dot + month + dot + year;
            break;
        default: // Default to mm/dd/yyyy
            dateString = month + sep + day + sep + year;
            break;
    }
    
    return dateString;
}

//-----------------------------------------------
// padd a zero if string is one char
function paddZero(s) 
{
    if (s >= 0 && s <= 9) {
        s = '0' + s;
    }
    return s;
}
//------------------------------------------------------

function getDateFormatByLocale(locale) {
    if (locale == "ja_JP" || locale == "zh_CN") {
        
        sDateFormat = "\u0434\u0434.\u043c\u043c.\u0433\u0433\u0433\u0433";
    
    } else if ((locale == "es_ES") || (locale == "fr_FR") || (locale == "it_IT") || (locale == "pt_BR") || (locale == "ar_AE")) {
        
        sDateFormat = "dd/mm/yyyy";
    
    } else if (locale == "de_DE" || locale == "ru_RU" || locale == "pl_PL") {
        sDateFormat = "dd.mm.yyyy";
    } else {
        
        sDateFormat = "mm/dd/yyyy";
    
    }
    return sDateFormat;
}

/**************************************************************************************



/common/js/lib/jquery/easing.js



**************************************************************************************/
// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];

jQuery.extend(jQuery.easing, 
{
    def: 'easeOutQuad',
    swing: function(x, t, b, c, d) {
        //alert(jQuery.easing.default);
        return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
    },
    easeInQuad: function(x, t, b, c, d) {
        return c * (t /= d) * t + b;
    },
    easeOutQuad: function(x, t, b, c, d) {
        return -c * (t /= d) * (t - 2) + b;
    },
    easeInOutQuad: function(x, t, b, c, d) {
        if ((t /= d / 2) < 1)
            return c / 2 * t * t + b;
        return -c / 2 * ((--t) * (t - 2) - 1) + b;
    },
    easeInCubic: function(x, t, b, c, d) {
        return c * (t /= d) * t * t + b;
    },
    easeOutCubic: function(x, t, b, c, d) {
        return c * ((t = t / d - 1) * t * t + 1) + b;
    },
    easeInOutCubic: function(x, t, b, c, d) {
        if ((t /= d / 2) < 1)
            return c / 2 * t * t * t + b;
        return c / 2 * ((t -= 2) * t * t + 2) + b;
    },
    easeInQuart: function(x, t, b, c, d) {
        return c * (t /= d) * t * t * t + b;
    },
    easeOutQuart: function(x, t, b, c, d) {
        return -c * ((t = t / d - 1) * t * t * t - 1) + b;
    },
    easeInOutQuart: function(x, t, b, c, d) {
        if ((t /= d / 2) < 1)
            return c / 2 * t * t * t * t + b;
        return -c / 2 * ((t -= 2) * t * t * t - 2) + b;
    },
    easeInQuint: function(x, t, b, c, d) {
        return c * (t /= d) * t * t * t * t + b;
    },
    easeOutQuint: function(x, t, b, c, d) {
        return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
    },
    easeInOutQuint: function(x, t, b, c, d) {
        if ((t /= d / 2) < 1)
            return c / 2 * t * t * t * t * t + b;
        return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;
    },
    easeInSine: function(x, t, b, c, d) {
        return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;
    },
    easeOutSine: function(x, t, b, c, d) {
        return c * Math.sin(t / d * (Math.PI / 2)) + b;
    },
    easeInOutSine: function(x, t, b, c, d) {
        return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
    },
    easeInExpo: function(x, t, b, c, d) {
        return (t == 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b;
    },
    easeOutExpo: function(x, t, b, c, d) {
        return (t == d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b;
    },
    easeInOutExpo: function(x, t, b, c, d) {
        if (t == 0)
            return b;
        if (t == d)
            return b + c;
        if ((t /= d / 2) < 1)
            return c / 2 * Math.pow(2, 10 * (t - 1)) + b;
        return c / 2 * (-Math.pow(2, -10 * --t) + 2) + b;
    },
    easeInCirc: function(x, t, b, c, d) {
        return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b;
    },
    easeOutCirc: function(x, t, b, c, d) {
        return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;
    },
    easeInOutCirc: function(x, t, b, c, d) {
        if ((t /= d / 2) < 1)
            return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b;
        return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;
    },
    easeInElastic: function(x, t, b, c, d) {
        var s = 1.70158;
        var p = 0;
        var a = c;
        if (t == 0)
            return b;
        if ((t /= d) == 1)
            return b + c;
        if (!p)
            p = d * .3;
        if (a < Math.abs(c)) {
            a = c;
            var s = p / 4;
        } 
        else
            var s = p / (2 * Math.PI) * Math.asin(c / a);
        return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
    },
    easeOutElastic: function(x, t, b, c, d) {
        var s = 1.70158;
        var p = 0;
        var a = c;
        if (t == 0)
            return b;
        if ((t /= d) == 1)
            return b + c;
        if (!p)
            p = d * .3;
        if (a < Math.abs(c)) {
            a = c;
            var s = p / 4;
        } 
        else
            var s = p / (2 * Math.PI) * Math.asin(c / a);
        return a * Math.pow(2, -10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;
    },
    easeInOutElastic: function(x, t, b, c, d) {
        var s = 1.70158;
        var p = 0;
        var a = c;
        if (t == 0)
            return b;
        if ((t /= d / 2) == 2)
            return b + c;
        if (!p)
            p = d * (.3 * 1.5);
        if (a < Math.abs(c)) {
            a = c;
            var s = p / 4;
        } 
        else
            var s = p / (2 * Math.PI) * Math.asin(c / a);
        if (t < 1)
            return -.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
        return a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b;
    },
    easeInBack: function(x, t, b, c, d, s) {
        if (s == undefined)
            s = 1.70158;
        return c * (t /= d) * t * ((s + 1) * t - s) + b;
    },
    easeOutBack: function(x, t, b, c, d, s) {
        if (s == undefined)
            s = 1.70158;
        return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
    },
    easeInOutBack: function(x, t, b, c, d, s) {
        if (s == undefined)
            s = 1.70158;
        if ((t /= d / 2) < 1)
            return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b;
        return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b;
    },
    easeInBounce: function(x, t, b, c, d) {
        return c - jQuery.easing.easeOutBounce(x, d - t, 0, c, d) + b;
    },
    easeOutBounce: function(x, t, b, c, d) {
        if ((t /= d) < (1 / 2.75)) {
            return c * (7.5625 * t * t) + b;
        } else if (t < (2 / 2.75)) {
            return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b;
        } else if (t < (2.5 / 2.75)) {
            return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b;
        } else {
            return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b;
        }
    },
    easeInOutBounce: function(x, t, b, c, d) {
        if (t < d / 2)
            return jQuery.easing.easeInBounce(x, t * 2, 0, c, d) * .5 + b;
        return jQuery.easing.easeOutBounce(x, t * 2 - d, 0, c, d) * .5 + c * .5 + b;
    }
});

/**************************************************************************************



/mobile/common/js/global/global.js



**************************************************************************************/
SW.expandingList = (function() {
    var self = {
        init: function() {
            $('.expandingList .expandable>:first-child').off('click');
            var accountLanding = $('body').find('div.myAccountLanding');
            
            $('.expandingList .expandable>:first-child').click(function(e) {
                //$(this).nextAll().toggle($.fx.speeds._default);
                var hotelDirectory = $('body').find('#directoryResults');
                if ($(this).hasClass("opened")) {
                    //rotate our arrow down
                    $(this).find(".navLinkArrow").removeClass("rotateUp transition").addClass("rotateDown transition");
                    $(this).nextAll().slideUp(500, "easeInBack");
                    $(this).toggleClass("opened");
                    
                    if ($(this).hasClass("videoClick")) {
                        var iframe = $(this).parent().find(".videoWrapper iframe");
                        $(iframe).attr('src', '');
                    }
                } else {
                    //rotate our arrow down
                    $(this).find(".navLinkArrow").removeClass("rotateDown transition").addClass("rotateUp transition");
                    $(this).nextAll().slideDown(500, "easeOutBack", function() {
                    });
                    $(this).toggleClass("opened");
                    
                    if ($(this).hasClass("videoClick")) {
                        var iframe = $(this).parent().find(".videoWrapper iframe");
                        $(iframe).attr('src', $(iframe).data('src'));
                    }

                    //if we are on hotel directory, eval our star ratings
                    if (hotelDirectory.length === 1) {
                        var target = $(e.currentTarget).parent().find('.propertyRatings');
                        if ($(target).hasClass('rated')) {
                        //do nothing
                        //console.log("ive already been rated");
                        } else {
                            $(target).addClass("rated");
                            SW.propertyRatings.setRating(target);
                        }
                    
                    }
                
                }
                return false;
            }).nextAll().hide();
            
            if (accountLanding.length === 1) {
                //expand our first li
                $('#accountLinks .expandingList .expandable:first-child>:first-child').trigger('click');
            }

            // opens expandable list with defaultOpen ID
            var defaultElementToOpen = $('#defaultOpen');
            if (defaultElementToOpen) {
                defaultElementToOpen.trigger('click');
            }

            // For Corp pages only - opens expandable top navigation list depending page the user is on.
            // @author - michael.simmons@starwoodhotels.com
            if ($('.corporate') || $('.CORP')) {
                var persona = $('#primaryContainer').data('persona');
                if (persona) {
                    $('#' + persona + 'PersonaHeaderLink').trigger('click');
                }
            }
        }
    };
    return self;
})(jQuery);

SW.globalNavigation = (function() {
    var self = {
        init: function() {
            var self = this;
            $.each($('nav li.navItem'), function(index, element) {
                self.navSetup(index, element, self);
                self.setIndex(0)
            })
        },
        navSetup: function(index, element, self) {
            $.fx.speeds._default = 100;
            
            var link = $(element).find('a.navLink')[0], 
            navItem = element, 
            options = $(element).find('div.navOptions')[0], 
            close = $(element).find('.navClose')[0], 
            theIndex, 
            prevIndex;
            
            
            $(options).dialog({
                autoOpen: false,
                //show: {effect: 'fadeIn',duration: 500},
                modal: true,
                hide: {effect: "fadeOut",duration: 500},
                draggable: false,
                //this positions the opened nav 40px below the header nav, regardless of viewport size
                position: {my: "left top+40",at: "left top",collision: "none"},
                dialogClass: "navDialog",
                width: '100%',
                resizable: false
            });
            $(close).on('click', function(e) {
                e.preventDefault();
                $(options).dialog('close');
                $('nav li.active').removeClass('active');
                $('nav ul').removeClass('active' + self.getIndex());
                if (/iPhone/i.test(navigator.userAgent)) {
                    self.removeOverlayEvent();
                }
            
            });
            $(link).click(function(e) {
                $('div.ui-widget-content:last-child').fadeIn(500, function() {
                    $('div.ui-widget-overlay').fadeIn(500);
                });
                
                
                self.setPrevIndex(self);
                self.setIndex(index);
                $.each($('div.navOptions'), function(index, element) {
                    if (options != element && $(element).dialog('isOpen')) {
                        $(element).dialog('close');
                    }
                })

                //creating toggle for main nav so a second click collapses modal - jjw | 9.18.12
                if ($(options).dialog("isOpen") == false) {
                    $('nav li.navItem, nav ul').removeClass('active');
                    $('nav ul').removeClass('active' + self.getPrevIndex());
                    $(navItem).addClass('active');
                    $('nav ul').addClass('active' + self.getIndex());
                    $(options).dialog("open");
                } else {
                    $(navItem).removeClass('active');
                    $('nav ul').removeClass('active' + self.getIndex());
                    $(options).dialog("close");
                }

                //close event for overlay if on iphone
                if (/iPhone/i.test(navigator.userAgent)) {
                    self.removeOverlayEvent();
                    self.setOverlayEvent(options, self);
                }
                return false;
            });
            
            $('body').on('click', function(e) {
                if (jQuery(options).dialog('isOpen') && !jQuery(e.target).is('.ui-dialog, .navLink') && !jQuery(e.target).closest('.ui-dialog').length) {
                    jQuery(options).dialog('close');
                    $('nav li.active').removeClass('active');
                    $('nav ul').removeClass('active' + self.getIndex());
                }
            }
            );
        },
        closeNavigation: function() {
            $.each($('div.navOptions'), function(index, element) {
                $(element).dialog('close');
                $('nav ul').removeClass('active' + index);
            });
            $('nav li.active').removeClass('active');
        },
        
        getIndex: function() {
            return theIndex;
        },
        
        setIndex: function(index) {
            theIndex = index;
        },
        
        getPrevIndex: function() {
            return prevIndex;
        },
        
        setPrevIndex: function(self) {
            prevIndex = self.getIndex();
        },
        
        setOverlayEvent: function(dialog, self) {
            $('body').live('tap', function(e) {
                if (e.target.className === "ui-widget-overlay") {
                    //using timeout here so event doesn't click other buttons below 
                    setTimeout(function() {
                        jQuery(dialog).dialog('close')
                    }, 500);
                    $('nav li.active').removeClass('active');
                    $('nav ul').removeClass('active' + self.getIndex());
                    self.removeOverlayEvent();
                }
            });
        },
        
        removeOverlayEvent: function(self) {
            $('body').unbind('tap');
        }
    
    
    };
    return self;
})(jQuery);

SW.popupLayer = (function() {
    var popupLayer, siteContainer, target;
    var self = {
        init: function() {
            siteContainer = $('#siteContainer');
            var self = this;
            $('.popupLayer').live('click', function(e) {
                e.preventDefault();
                self.openPopup(e);
                SW.globalNavigation.closeNavigation();
            });
        },
        openPopup: function(e) {
            target = $(e.target);
            if (!target.is('a')) {
                target = $(e.target).closest('a');
            }
            
            var popupLink = target;
            var popupId = $(popupLink).attr('data-popupId');
            if (popupId == null || popupId == '') {
                var popupUrl = $(popupLink).attr('href');
            }
            
            popupLayer = $('#popupLayer');
            if (popupLayer.length == 0) {
                $('body').append("<div id='popupLayer'></div>");
                popupLayer = $('#popupLayer');
            }
            
            popupLayer.css('height', $(window).height()).html("");
            var offsetTop = $(popupLink).offset().top - $(window).scrollTop();
            
            if (popupUrl && popupUrl != '') {
                $.get(popupUrl, function(data) {
                    popupLayer.html(data);
                    handlePopup();
                });
            } else {
                popupLayer.html($("#" + popupId).html()).promise().done(function() {
                    if (initializeLinks) {
                        initializeLinks()
                    }
                });
                handlePopup();
            }
            function handlePopup() {
                siteContainer.css("height", popupLayer.outerHeight());
                $(siteContainer).addClass('popupEnabled');
                window.scrollTo(0, 0);
                popupLayer.css("display", "block");
                
                var popupLayerClass = popupLink.attr('data-addPopupClass');
                if (popupLayerClass) {
                    popupLayer.addClass(popupLayerClass);
                }
                
                var closeButton = popupLayer.find('.closeButton');
                $(closeButton).on('click', function(e) {
                    var closeLink = $(e.target);
                    if (!closeLink.is('a')) {
                        closeLink = $(closeLink).closest('a');
                    }
                    // added to not prevent default on BRG popup
                    
                    if (closeLink.attr('href') == "") {
                        e.preventDefault();
                    }
                    siteContainer.css("height", 'auto');
                    $(siteContainer).removeClass('popupEnabled');
                    if ($(popupLink).offset()) {
                        window.scrollTo(0, $(popupLink).offset().top - offsetTop);
                    }
                    popupLayer.css("display", "none");
                    $(this).off('click');
                
                });
            }
        }
    };
    return self;
})(jQuery);

SW.propertyRatings = (function() {
    var self = {
        init: function() {
            var self = this;
            var hotelDirectory = $('body').find('#directoryResults');
            //if not on hotel directory page
            if (hotelDirectory.length === 0) {
                $.each($('.propertyRatings'), function(index, element) {
                    self.setRating(element);
                });
            } else if (hotelDirectory.length === 1) {
            //do nothing
            }
        
        },
        setRating: function(element) {
            var ratingsWrapper = $(element), 
            //totalWidth = parseInt(ratingsWrapper.find('.starsDefault').width(), 10),
            rating = ratingsWrapper.find('.ratingsNumber').html().split("/"), 
            numerator = parseFloat(rating[0]), 
            denominator = parseInt(rating[1], 10), 
            width = Math.round((numerator / denominator) * 75);
            if (isNaN(width)) {
                $(ratingsWrapper).hide();
            } else {
                ratingsWrapper.find('.starsColor').width(width);
            }
        }
    };
    return self;
})(jQuery);

SW.propertyRateSearchValidation = (function(options) {
    var self = {
        init: function(options) {
            var self = this;
            self.form = $('#' + options.formID);
            self.formSubmitBtn = $('#' + options.submitBtnID);
            self.prefLimit = self.form.attr('data-prefLimit');
            self.submitData = self.form.attr('data-submit');
            self.setNumber = $(".setNumber");
            self.standardInputs = {city: '',state: '',chinaState: '',japanState: '',country: ''};
            self.hiddenSubmitButton = $('#' + options.hiddenSubmitID);
            self.dateInputs();
            self.ratePref();
            
            if ($('#stateProvince').length > 0) {
                self.dropDowns();
            }
            
            $(self.setNumber).on('keypress', function(event) {
                return (/\d/.test(String.fromCharCode(event.which)));
            });
            
            $(self.setNumber).on('change', function(event) {
                return (/\d/.test($(self.setNumber).val()));
            });
            
            self.hiddenSubmitButton.on('click', function(e) {
                e.preventDefault();
                self.submitForm();
            });
        },
        
        dateInputs: function() {
            var calendarObj = $.data((self.form[0]) ? self.form[0] : self.form, 'calendarObj');
            if (calendarObj) {
                calendarObj.calendar.submitEvent.subscribe(function() {
                    $('#arrivalDateDisplay').html($(this._menuElements.rangeStartInstructionsDate).html());
                    $('#departureDateDisplay').html($(this._menuElements.rangeEndInstructionsDate).html());
                }, calendarObj.calendar, true);
            }
        },
        
        ratePref: function() {
            //validate just in case they reloaded and are in a bad state
            self.validatePrefs();
            
            $('.ratePrefCheckbox').on('click', function(e) {
                self.validatePrefs();
            });
            
            $('.rateInput').on('keyup', function() {
                if ($(this).val().length > 0) {
                    $('#prefCheck_' + $(this).data('index')).attr("checked", "checked");
                } else {
                    $('#prefCheck_' + $(this).data('index')).removeAttr("checked");
                }
                
                self.validatePrefs();
            });
            
            $('.rateInput').on('change', function() {
                if ($(this).val().length > 0) {
                    $('#prefCheck_' + $(this).data('index')).attr("checked", "checked");
                } else {
                    $('#prefCheck_' + $(this).data('index')).removeAttr("checked");
                }
                
                self.validatePrefs();
            });
            
            $('.validatePrefs').on('click', function(e) {
                self.validatePrefs();
            });
            
            $('.validatePrefsDropdown').on('change', function(e) {
                self.validatePrefs();
            });
        },
        
        validatePrefs: function() {
            //Stop form submission, will be reenabled if rate prefs are valid
            self.formSubmitBtn.off("click");
            self.hiddenSubmitButton.off("click");

            //validation for overall dialog
            var checkedPrefs = new Array();
            var spgRate = false;
            
            $('.ratePrefCheckbox').each(function() {
                if (this.checked) {
                    checkedPrefs[checkedPrefs.length] = this;
                    if ($(this).val().indexOf('SPG') > -1) {
                        spgRate = true;
                    }
                }
            });

            //Validate SPG Errors
            var tooManyRoomsAdults = false;
            
            if (spgRate) {
                if ($('#numberOfRooms').val() > 1) {
                    tooManyRoomsAdults = true;
                }
                
                if ($('#numberOfAdults').val() > 2) {
                    tooManyRoomsAdults = true;
                }
            }

            //Validate SET Number
            var validSET = true;
            var setNumberValue = self.setNumber.val();
            if (self.setNumber && setNumberValue) {
                if (setNumberValue.length > 0) {
                    //SET not a number
                    if (isNaN(setNumberValue)) {
                        validSET = false;
                    }
                }
            }
            
            $(".searchRatePrefsError").hide();

            //too many or too few checks?
            if (checkedPrefs.length > self.prefLimit) {
                selectedError = true;
                $(".maxRatesError").show();
            } else if (checkedPrefs.length == 0) {
                $('.noRatesError').show();
            } else if (tooManyRoomsAdults) {
                $('.spgRatesError').show();
            } else if (!validSET) {
                $('.invalidSET').show();
            } else {
                self.formSubmitBtn.on("click", function(e) {
                    e.preventDefault();
                    self.submitForm();
                });
                self.hiddenSubmitButton.on('click', function(e) {
                    e.preventDefault();
                    self.submitForm();
                });
            }
        },
        
        updateRatePrefParam: function() {
            var checkedPrefValues = new Array();
            
            var rpParamValue = "";
            $.each($('.ratePrefCheckbox'), function() {
                if (this.checked) {
                    var prefString = $(this).val();
                    if (prefString.split(":")[1] == '') {
                        prefString += $("#txtCode_" + this.id.split("_")[1]).val();
                    }
                    checkedPrefValues[checkedPrefValues.length] = prefString;
                }
            });
            
            var rpParamValue = "";
            //if less than prefLimit were checked, we need the trailing commas to force blanks
            for (var i = 0; i < self.prefLimit; i++) {
                if (i < checkedPrefValues.length) {
                    rpParamValue += checkedPrefValues[i];
                }
                
                if (i < parseInt(self.prefLimit - 1)) {
                    rpParamValue += ",";
                }
            }
            
            $('#rp').val(rpParamValue);
        },
        
        submitForm: function() {
            try {
                self.updateRatePrefParam();
                if (self.submitData !== 'false') {
                    self.form.submit();
                } else {
                    var newUrl = SW.tools.setUrlParameter($("#backRefUrl").val(), "arrivalDate", $('#arrivalDate').val());
                    newUrl = SW.tools.setUrlParameter(newUrl, "departureDate", $('#departureDate').val());
                    newUrl = SW.tools.setUrlParameter(newUrl, "rp", $('#rp').val());
                    newUrl = SW.tools.setUrlParameter(newUrl, "numberOfRooms", $('#numberOfRooms').val());
                    newUrl = SW.tools.setUrlParameter(newUrl, "numberOfAdults", $('#numberOfAdults').val());
                    newUrl = SW.tools.setUrlParameter(newUrl, "numberOfChildren", $('#numberOfChildren').val());
                    location.replace(newUrl);
                }
            
            } catch (err) {
                console.log(err.message); // DEBUG
            }
        },
        
        dropDowns: function() {
            $('#country').on('change', function(e) {
                self.checkState()
            });
            $('#romanStateProvince').on('change', function(e) {
                self.getCities()
            });
            $('#stateProvince').on('change', function(e) {
                self.getCities()
            });
            $('#chinaStateProvince').on('change', function(e) {
                self.getCities()
            });
            $('#japanStateProvince').on('change', function(e) {
                self.getCities()
            });
            
            self.checkState();
            
            var country = $('#destinationSearch').data('country');
            var stateProvince = $('#destinationSearch').data('stateprovince');
            var city = $('#destinationSearch').data('city');

            //Select the proper country
            self.setDefaultDropdown('country', country);

            //Select the proper state
            self.setDefaultDropdown('romanStateProvince', stateProvince);
            self.setDefaultDropdown('stateProvince', stateProvince);
            self.setDefaultDropdown('japanStateProvince', stateProvince);
            self.setDefaultDropdown('chinaStateProvince', stateProvince);
            
            if (country !== undefined) {
                self.getCities();
                if (city !== undefined) {
                    self.setDefaultDropdown('city', city);
                }
            }
        },
        
        checkState: function() {
            var citySelect = $('#city');
            var stateProvince = $('#stateProvince');
            var japanStateProvince = $('#japanStateProvince');
            var chinaStateProvince = $('#chinaStateProvince');
            var romanStateProvince = $('#romanStateProvince')
            //Need to clear out latitude, longitude and complexSearchField if the country is changed in case of an initial find by me search.
            $('#latitude').val('');
            $('#longitude').val('');
            $('input[name="complexSearchField"]').val('');
            
            var me = this;
            var country = $('#country').val();
            
            if (country == "US" || country == "CA") {
                stateProvince.attr('disabled', true).val('').hide();
                japanStateProvince.attr('disabled', true).val('').hide();
                chinaStateProvince.attr('disabled', true).val('').hide();
                romanStateProvince.removeAttr('disabled').val('').show();
                citySelect.attr('disabled', true);
            } else if (country == "CN") {
                stateProvince.attr('disabled', true).val('').hide();
                japanStateProvince.attr('disabled', true).val('').hide();
                romanStateProvince.attr('disabled', true).val('').hide();
                chinaStateProvince.removeAttr('disabled').val('').show();
                citySelect.attr('disabled', true);
                self.getCities();
            } else if (country == "JP") {
                stateProvince.attr('disabled', true).val('').hide();
                chinaStateProvince.attr('disabled', true).val('').hide();
                romanStateProvince.attr('disabled', true).val('').hide();
                japanStateProvince.removeAttr('disabled').val('').show();
                citySelect.attr('disabled', true);
                self.getCities();
            } else {
                stateProvince.attr('disabled', true).val('').hide();
                japanStateProvince.attr('disabled', true).val('').hide();
                chinaStateProvince.attr('disabled', true).val('').hide();
                romanStateProvince.attr('disabled', true).val('').show();
                citySelect.attr('disabled', true);
                self.getCities();
            }
        },
        
        getCities: function() {
            var citySelect = $('#city');

            //Need to clear out latitude, longitude and complexSearchField if the country is changed in case of an initial find by me search.
            $('#latitude').val('');
            $('#longitude').val('');
            $('input[name="complexSearchField"]').val('');
            
            citySelect.attr('disabled', 'true');
            var countryVal = $('#country').val();
            var stateVal = self.getStateListObject().val();
            
            $.ajax({
                type: "GET",
                async: false,
                url: "/common/search/get_cities.jsp",
                dataType: 'xml',
                data: {country: countryVal,state: stateVal},
                success: function(data) {
                    var firstOption = $('#city option').first();
                    var citySelectOptions = $(data).find("city");
                    
                    citySelect.empty().append(firstOption);
                    citySelectOptions.each(function() {
                        citySelect.append(new Option($(this).text(), $(this).text()));
                    });
                    
                    if (citySelectOptions.length > 0) {
                        citySelect.removeAttr('disabled');
                    }
                }
            });
        },
        
        getStateListObject: function() {
            var country = $('#country').val();
            var stateList = $('#romanStateProvince');
            
            if (country == "US" || country == "CA") {
                stateList = $('#romanStateProvince');
            } else if (country == "CN") {
                stateList = $('#chinaStateProvince');
            } else if (country == "JP") {
                stateList = $('#japanStateProvince');
            } else {
                stateList = $('#romanStateProvince');
            }
            
            return stateList;
        },
        
        setDefaultDropdown: function(dropDownId, defaultValue) {
            $('#' + dropDownId + ' option').each(function() {
                if ($(this).val() == defaultValue) {
                    $(this).attr('selected', 'true');
                } else {
                    $(this).removeAttr('selected');
                }
            });
        }
    };
    return self;
})(jQuery);

SW.propertyParticipation = (function() {
    var self = {
        init: function() {
            self.limitedParticipation();
            self.noParticipation();
            self.noAvailability();
            self.linkInfoToolTip();
            self.calendarUnavailable();
        },
        
        limitedParticipation: function() {
            $('.limitedParticipation').on('click', function(e) {
                e.preventDefault();
                
                var target = $(e.target), popup = $('#limitedSpg .errorBody');
                if (popup) {
                    popup.children().not('button').remove();
                    popup.prepend(target.closest('.rates').find('.limitedParticipationMessage').children().clone());
                }
                
                target.attr({
                    'data-popupId': 'limitedSpg'
                    ,'data-addPopupClass': 'popupLayerBox propertyParticipationOverlay'
                });
                
                SW.popupLayer.openPopup(e);
            });
        },
        
        noParticipation: function() {
            $('.noParticipation').on('click', function(e) {
                e.preventDefault();
                
                var target = $(e.target), popup = $('#noSpg .errorBody');
                if (popup) {
                    popup.children().not('button').remove();
                    popup.prepend(target.closest('.rates').find('.noParticipationMessage').children().clone());
                }
                
                target.attr({
                    'data-popupId': 'noSpg'
                    ,'data-addPopupClass': 'popupLayerBox propertyParticipationOverlay'
                });
                
                SW.popupLayer.openPopup(e);
            });
        },
        
        noAvailability: function() {
            $('.noAvailability').on('click', function(e) {
                e.preventDefault();
                $(e.target).attr('data-addPopupClass', 'popupLayerBox propertyParticipationOverlay');
                SW.popupLayer.openPopup(e);
            });
        },
        
        calendarUnavailable: function() {
            $('.calendarUnavail').on('click', function(e) {
                e.preventDefault();
                SW.popupLayer.openPopup(e);
            });
        },
        
        linkInfoToolTip: function() {
            $('ul').on('click', 'a.linkInfoToolTip', function(e) {
                e.preventDefault();
                SW.popupLayer.openPopup(e);
            });
        }
    };
    
    return self;
})(jQuery);

SW.lazyImages = (function() {
    var self = {
        init: function(loadSequence) {
            var self = this;
            self.loadSequence = "series"; //series or parallel
            self.lazyLoad();
        },
        lazyLoad: function() {
            
            if (self.loadSequence == 'parallel') {
                //implementation 1 (in parallel)
                $('img[data-imageUrl]').each(
                function(i, a) {
                    a.setAttribute('src', a.getAttribute('data-imageUrl'));
                });
            } 
            else {
                //implementation 2 (in series)
                var images = $('img[data-imageUrl]');
                images.each(
                function(i, a) {
                    if (i + 1 < images.length) {
                        loadNextFunction = function() {
                            //load next
                            images[i + 1].setAttribute('src', images[i + 1].getAttribute('data-imageUrl'));
                        }
                        a.onload = loadNextFunction;
                        a.onerror = loadNextFunction;
                    }
                });
                //load first
                images.first().attr('src', images.first().attr('data-imageUrl'));
            }
        }
    };
    return self;
})(jQuery);

SW.buttonSizing = (function() {
    var self = {
        init: function() {
            var self = this;
            self.resizeButtons('.bodyAdjoiningButton');
            self.resizeButtons('.searchAdjoiningButton');
            self.resizeButtons('.adjoiningHeader');
            self.resizeButtons('.adjoiningInputSubmitButton');
        },
        resizeButtons: function(className) {
            var newHeight = 0;
            
            $(className).each(function() {
                var curHeight = $(this).height();

                //for buttons, need to add the padding to get the true height
                if ($(this).is("button") || $(this).is("input")) {
                    $(this).data("topPadding", parseInt($(this).css('padding-top')));
                    $(this).data("bottomPadding", parseInt($(this).css('padding-bottom')));
                }
                
                if (curHeight > newHeight) {
                    newHeight = curHeight;
                }
            });
            
            $(className).each(function() {
                var curHeight = $(this).height();
                
                if (!$(this).is("button") && !$(this).is("input")) {
                    $(this).height(newHeight);

                    //If the element is not a button and not an li need to fix the line height to  center text vertically
                    if (!$(this).is("li")) {
                        if (curHeight != newHeight) {
                            var tempLineHeight = $(this).css('line-height');
                            var lineHeight = Math.floor(parseInt(tempLineHeight));
                            
                            if (isNaN(lineHeight)) {
                                var tempFontSize = $(this).css('font-size');
                                lineHeight = Math.floor(parseInt(tempFontSize));
                            }

                            // If element is an input then we need to do some additional calculations and change the padding on the parent.
                            if ($(this).is("input")) {
                                lineHeight = parseInt(lineHeight - 14);
                                $(this).parent().css("padding", "0 7px");
                            }
                            
                            var newLineHeight = Math.floor(newHeight / (curHeight / lineHeight));
                            if (newLineHeight > newHeight) {
                                newLineHeight = newHeight;
                            }
                            
                            $(this).css("line-height", newLineHeight + "px");
                        }
                    }
                } else {
                    //console.log("button");
                    
                    var newButtonHeight = newHeight;
                    newButtonHeight = newButtonHeight + $(this).data("topPadding") + 1;
                    newButtonHeight = newButtonHeight + $(this).data("bottomPadding") + 1;
                    $(this).height(newButtonHeight);
                }
            });
        }
    };
    return self;
})(jQuery);

SW.urlSelect = (function() {
    var self = {
        init: function() {
            $('.urlSelect').bind('change', function() {
                var url = $(this).val();
                if (url) {
                    window.location = url;
                }
                return false;
            });
        }
    };
    return self;
})(jQuery);

//Set Back Arrow Line Height function
SW.setBackArrowLineHeight = (function() {
    var self = {
        init: function() {
            var self = this;
            self.setLineHeight();
        },
        setLineHeight: function() {
            var textElementHeight = $('.backArrowMessage').height();
            var fontSize = $('.backArrowMessage').css("font-size");
            var numberOfLines = Math.floor(parseInt(textElementHeight) / parseInt(fontSize));
            
            if (numberOfLines == 1) {
                $('.backArrow').addClass('singleLine');
            } 
            else if (numberOfLines == 2) {
                $('.backArrow').addClass('doubleLine');
            } 
            else {
                $('.backArrow').addClass('tripleLine');
            }
        }
    };
    return self;
})(jQuery);

/**
 * Converts YouTube Url into embed url with no cookies.
 * Extracted from SW.local.YouTubeHelper
 * @author: michael.simmons@starwoodhotels.com
 * @param: url - YouTube Video Url to be converted
 * @param: elementId - id of element to insert video iframe into
**/
SW.youtubeVideoCoverer = (function() {
    var self = {
        init: function(url, elementId) {
            self.convertUrl(url, elementId);
        },
        convertUrl: function(url, elementId) {
            var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/;
            var match = url.match(regExp);
            if (match && match[7].length == 11) {
                $('#' + elementId).html('<iframe src="//www.youtube-nocookie.com/embed/' + match[7] + '?rel=0" frameborder="0" allowfullscreen="true"><br\/><\/iframe>');
            }
        }
    };
    return self;
})(jQuery);

$(document).ready(function() {
    SW.popupLayer.init();
    SW.globalNavigation.init();
    SW.buttonSizing.init();
    SW.expandingList.init();
    SW.propertyRatings.init();
    SW.propertyParticipation.init();
    SW.lazyImages.init();
    SW.urlSelect.init();
    SW.setBackArrowLineHeight.init();
});

//Needed for T&C popups in SPG
var initializeLinks;





/**************************************************************************************



/mobile/common/js/global/searchModule.js



**************************************************************************************/
var tempLatitude, tempLongitude, selectedInput, selectedForm;

$(document).ready(function() {
    $.each($('.searchForm'), function() {
        var searchForm = this;
        var recentSearch = $(this).find('.recentSearch');
        var calendarIcon = $(this).find('.calendarIcon');
        var submitSearch = $(this).find('.submitSearch');
        var currentLocation = $(this).find('.currentLocation');
        var input = $(this)[0].elements.complexSearchField;
        var isUsingDatePicker = $(input).parents("#searchFormContainer").hasClass("datePicker");
        var latitude = $(this)[0].elements.latitude;
        var longitude = $(this)[0].elements.longitude;
        var arrivalDate = $(this)[0].elements.arrivalDate;
        var departureDate = $(this)[0].elements.departureDate;
        var localeCode = $(this)[0].elements.localeCode.value || document.body.className.replace(/(lang_(.*?))/g, '');
        var clCopy = $(input).attr("data-clCopy");

        // GeoSuggest including properties - config
        var sQuery = "", 
        suggestUrl = $("input[name='suggestUrl']").val(), 
        autoSuggestMaxResults = $("input[name='reqRecords']").val(), 
        propIdsInput = $("input[name='propertyIds']"), 
        typeInput = $("input[name='searchType']");
        
        if ($(searchForm).hasClass("topNavSearch")) {
            currentLocation = $('#topNearMeLink');
        }
        var submitSearchForm = false;
        
        if ($(searchForm).hasClass('submitSearchForm')) {
            submitSearchForm = true;
        }
        $('.clearSearch').on('click', function(e) {
            e.preventDefault();
            $(input).val('');
            $(input).focus();
        });
        $(submitSearch).on('click', function(e) {
            e.preventDefault();
            $(searchForm).submit();
        });
        $(searchForm).on('submit', function(e) {
            try {
                if ($(input).val() != clCopy && latitude && longitude) {
                    $(latitude).val('');
                    $(longitude).val('');
                }
                return true;
            } 
            catch (e) {
                alert(e.message);
            }
        });
        $(currentLocation).on('click', function(e) {
            e.preventDefault();
            navigator.geolocation.getCurrentPosition(function(position) {
                $(latitude).val(position.coords.latitude);
                $(longitude).val(position.coords.longitude);
                $(input).val(clCopy);
                
                if ($(currentLocation).hasClass("directSubmit")) {
                    $(searchForm).submit();
                } else {
                    $(input).focus();
                }
            }, function(error) {
                handleError(error, e);
            });
        });
        if ($(input).hasClass('searchSuggest')) {
            initSearchSuggest();
        }
        function initSearchSuggest() {
            var config = {
                minLength: 2
            };
            $(input).on('focus', function(e) {
                $('.clearSearch').css('visibility', 'visible');
                if (!$(searchForm).hasClass("topNavSearch") && $('#searching').length > 0) {
                    $('html, body').animate({
                        scrollTop: $("#searching").offset().top
                    }, 300);
                }
                if ($(input).val().length < 2 && $(recentSearch).find('ul li').length > 0) {
                    $(recentSearch).css('display', 'block');
                }
            });
            $(input).on('blur', function(e) {
                $(document).one('click', function(e) {
                    if ($(recentSearch).has(e.target).length === 0 || $('.clearSearch').has(e.target).length === 0) 
                    {
                        $(recentSearch).hide();
                        $('.clearSearch').css('visibility', 'hidden');
                    }
                });
            });
            $(input).on('keyup', function(e) {
                if ($(input).val().length < 2 && $(recentSearch).find('ul li').length > 0) {
                    $(recentSearch).css('display', 'block');
                    $(propIdsInput).val("");
                    $(typeInput).val("");
                } else if ($(input).val().length >= 2) {
                    $(recentSearch).css('display', 'none');
                }
            });
            
            $('.recentSearch a.recent').on('click', function(e) {
                e.preventDefault();
                $(input).val($(e.target).text());
                $(recentSearch).css('display', 'none');
                $(input).focus();
            });
            
            $('.destinationInput').on('keyup', function() {
                sQuery = $(this).val().toLowerCase();
            });
            
            if (isUsingDatePicker) {
                $.extend(config, {
                    appendTo: $(input).parent()
                });
            }
            
            $.extend($.ui.autocomplete.prototype, {
                _renderMenu: function(ul, items) {
                    var self = this, 
                    $firstProp, 
                    $firstLoc;
                    $.each(items, function(index, item) {
                        self._renderItem(ul, item);
                    });
                    ul.css({
                        "position": "absolute"
                    });
                    $firstProp = ul.children('li.prop').first();
                    $firstLoc = ul.children('li.location').first();
                    
                    $firstProp.attr("data-icon", "\ue011");
                    $firstLoc.attr("data-icon", "\ue00e");
                    
                    $firstProp.css({
                        "padding-top": "5px"
                    });
                    $firstProp.prev().css({
                        "border-bottom": "1px solid #D9D9D9",
                        "padding-bottom": "5px"
                    });
                },
                _renderItem: function(ul, item) {
                    var sResultMatch = item.title, 
                    n = sResultMatch.toLowerCase().indexOf(sQuery), 
                    sStart = sResultMatch.substr(0, n), 
                    sMatch = sResultMatch.substr(n, sQuery.length), 
                    sRemainder = sResultMatch.substr(n + sQuery.length), 
                    aMarkup = "";

                    // output title, bolding matched characters
                    if (n >= 0) {
                        aMarkup += sStart + 
                        "<span style='font-weight:bold'>" + 
                        sMatch + 
                        "</span>" + 
                        sRemainder;
                    } else {
                        aMarkup = item.title;
                    }
                    
                    return $('<li style="border: none;"></li>')
                    .data("item.autocomplete", item)
                    .addClass(item.type)
                    .append('<a style="font-weight: normal;line-height: 17px;">' + aMarkup + '</a>')
                    .appendTo(ul);
                
                },
                _resizeMenu: function() {
                    this.menu.element.outerWidth(290);
                }
            });
            
            $.extend(config, {
                source: function(req, response) {
                    $.ajax({
                        url: suggestUrl + "&query=" + req.term,
                        data: {
                            reqRecords: autoSuggestMaxResults,
                            localeCode: localeCode
                        },
                        dataType: "jsonp",
                        success: function(data) {
                            response($.map(data.ResultSet.Result, function(dest, index) {
                                return {
                                    id: dest.ID,
                                    title: dest.Title,
                                    type: dest.Type
                                };
                            }));
                        }
                    });
                },
                focus: function(event, ui) {
                    if (ui.item.type === "prop") {
                        $(propIdsInput).val(ui.item.id);
                    } else {
                        $(propIdsInput).val("");
                    }
                    
                    $(input).val(ui.item.title);
                    $(typeInput).val(ui.item.type);
                    return false;
                },
                select: function(event, ui) {
                    if (ui.item.type === "prop") {
                        $(propIdsInput).val(ui.item.id);
                    } else {
                        $(propIdsInput).val("");
                    }
                    
                    $(input).val(ui.item.title);
                    $(typeInput).val(ui.item.type);
                    return false;
                }
            });
            $(input).autocomplete(config);
        }
        
        if (calendarIcon.length > 0) {
            // SW.local.content.TODAY = '<dateutil:getCalendarStartDate />';
            var stayCalInput = new SW.widget.Calendar.StayCalendarInput({
                trigger: $(calendarIcon).get(0),
                checkIn: $(arrivalDate).get(0),
                checkOut: $(departureDate).get(0),
                searchForm: searchForm,
                submitFormOnGo: submitSearchForm
            
            });
            stayCalInput.initialize();
            $.data(searchForm, "calendarObj", stayCalInput);
        }
    
    })

    //added to dynamically change invalid days slash through on calendar
    window.onresize = function(event) {
        dynamicCalendarSlashes();
    }
});

function handleError(error, event) {
    switch (error.code) 
    {
        case error.PERMISSION_DENIED:
            showGeoLocateError(event);
            break;
        case error.POSITION_UNAVAILABLE:
            showGeoLocateError(event);
            break;
        case error.TIMEOUT:
            showGeoLocateError(event);
            break;
        default:
            alert("unknown error");
            showGeoLocateError(event);
            break;
    }
}

function showGeoLocateError(e) {
    var siteContainer = $('#siteContainer');
    
    var element = $(e.target);
    
    if (!element.is('a')) {
        element = $(e.target).closest('a');
    }
    var popupLink = element;
    var popupLayer = $('#popupLayer');
    if (popupLayer.length == 0) {
        $('body').append("<div id='popupLayer'></div>");
        popupLayer = $('#popupLayer');
    }
    $(popupLayer).append($('#geoLocateError'));
    var offsetTop = $(popupLink).offset().top - $(window).scrollTop();
    
    SW.globalNavigation.closeNavigation();
    
    siteContainer.css("height", popupLayer.outerHeight());
    $(siteContainer).addClass('popupEnabled');
    window.scrollTo(0, 0);
    popupLayer.css("display", "block");
    $('#geoLocateError').css("display", "block");
    
    var closeButton = popupLayer.find('.closeButton');
    
    $(closeButton).on('click', function(e) {
        e.preventDefault();
        siteContainer.css("height", 'auto');
        $(siteContainer).removeClass('popupEnabled');
        if ($(popupLink).offset()) {
            window.scrollTo(0, $(popupLink).offset().top - offsetTop);
        }
        popupLayer.css("display", "none");
    });
}

//Added to Dynamically Size the calendar slashes for invalid days for mobile
//Gets called on calendarGroup createFramework() and window.onresize
function dynamicCalendarSlashes() {
    var calendarDayCell = $('td.day:first');
    var height = calendarDayCell.height();
    var width = $('body').width() / 7;
    
    var proposedSlashWidth = Math.sqrt(Math.pow(width, 2) + Math.pow(height, 2));
    var proposedAngle = (Math.PI / 2 - Math.atan(width / height));
    
    proposedSlashWidth *= 1.01;
    proposedAngle *= 1.04;
    
    var calendarSlashStyles = "<style id='slashStyle' type='text/css'>" 
    + ".calendarMonth .invalid::after, .calendarMonth .day:not(.availableRangeStart):not(.availableRangeEnd):not(.rangeStart)::after{" 
    + "width: " + proposedSlashWidth + "px;" 
    + "transform-origin: 2px 0px;" 
    + "transform: rotate(" + proposedAngle + "rad);" 
    + "-webkit-transform-origin: 2px 0px;" 
    + "-webkit-transform: rotate(" + proposedAngle + "rad);" 
    + "-ms-transform-origin: 2px 0px;" 
    + "-ms-transform: rotate(" + proposedAngle + "rad);" 
    + "}</style>";
    
    $('#slashStyle').remove();
    $('body').append(calendarSlashStyles);
}

/**************************************************************************************



/common/js/omniture/s_code_mobile.js



**************************************************************************************/
/* SiteCatalyst code version: H.24.1.
Copyright 1996-2011 Adobe, Inc. All Rights Reserved
More info available at http://www.omniture.com */

var s = s_gi(s_omnitureAccount)
/************************** CONFIG SECTION **************************/
/* Conversion Config */
s.currencyCode = "USD";
/* Link Tracking Config */
s.trackDownloadLinks = true;
s.trackExternalLinks = true;
s.trackInlineStats = true;
s.linkDownloadFileTypes = "exe,zip,wav,mp3,mov,mpg,avi,wmv,pdf,doc,docx,xls,xlsx,ppt,pptx";
s.linkInternalFilters = "javascript:,starwood.com,starwoodhotels,starwoodspecialoffers,spghoneymoon,starwooddestinations,hawaiiexclusive,starwoodchicago,fireflyhawaii,diplomatresort,starwoodhotels.com,fourpoints.com,luxurycollection.com,spg.com,sheraton.com,stregis.com,westin.com,preferredguest.com,whotel.com,whotels.com,atdmt.com,starwoodspecialoffers.com,starwooddestinations.com,stregisnewsletter.com,thelobby.com,starwoodrsvp.com,sheratonangebote.com,emusic.com,whotelstheworld.com,wthecard.rdai.com,starwoodspacollection.com,starwoodpromos.com,luxurycollectionpromotions.com,localhost:8080,wtaipei.com,starwood-ap.com,luxurycollectiondestinations.com,spghotescapes.com,wseoul.com,americas.starwoodoffers.com,starwoodpromos.com,westinmaui.com,thephoenician.com,w-barcelona.com,sheraton-waikiki.com,sheraton.pl,westinkaanapali.com,sheraton-maui.com,wsingaporesentosacove.com,royal-hawaiian.com,lemeridienmunich.com,sheratonclubroom.com,moana-surfrider.com,diplomatresort.com,wlondon.co.uk,westinny.com,sfpalace.com,wsouthbeach.com,sheratonmacao.com,wnewyork.com,sheratondenverdowntown.com,spg-asiapacific.com,stregisprinceville.com,sheraton-kauai.com,westinessence.com,grosvenorhouse-dubai.com,sheratonnewyork.com,stregisborabora.com,westinplayaconchal.com,danielihotelvenice.com,sheratontoronto.com,lemeridienetoile.com,westingrandmunich.com,sheratonkona.com,westinminaseyahi.com,upg.starwoodpromos.com,leroyalmeridien-dubai.com,north-america.starwoodoffers.com,w-hongkong.com,westinresortstjohn.com,starwoodmeetings.com,whollywoodhotel.com,westinharbourcastletoronto.com,wfortlauderdalehotel.com,sheratonbostonhotel.com,stregissaadiyatisland.com,lemeridienistanbuletiler.com,deals.sheraton.com,turnberryresort.co.uk,thenines.com,sheratondallashotel.com,westinsunsetkeycottages.com,westinprinceville.com,sheratonmaldives.com,lemeridien-mauritius.com,sheratonedinburgh.co.uk,westingrandberlin.com,westinpalacemadrid.com,westinnewyorkgrandcentral.com,sheratonneworleans.com,thewestinparis.com,westinbostonwaterfront.com,princess-kaiulani.com,stregisbalharbour.com,westinnusaduabali.com,westinseattle.com,sheratonparklane.com,westinpeachtreeplazaatlanta.com,westinlapalomaresort.com,al-maha.com,whotelaustin.com,lemeridien-dubai.com,sheratonmiragegoldcoast.com,wdallasvictory.com,westinsavannah.com,thelagunabali.com,theandaman.com,sheratonarabellapark.com,wsanfrancisco.com,aloftlondonexcel.com,grandebretagne.gr,sheratonportdouglas.com,national.ru,leroyalmeridienhamburg.com,lemeridienstuttgart.com,westinaruba.com,stregissingapore.com,wvieques.com,westincopleyplaceboston.com,sheratonatthewharf.com,hotelbristolwarsaw.pl,sheratongrandesukhumvit.com,sheratonontheparksydney.com,westincapetown.com,sheratonsalobre.com,westinhiltonheadisland.com,westinwhistler.com,lemeridien-borabora.com,sheratonlax.com,bookcadillacwestin.com,stregisbali.com,sheratonfrankfurtairport.com,wverbier.com,wseattle.com,sheratonathlonehotel.com,westin.pl,wchicago-lakeshore.com,lemeridienvienna.com,aloftbangkoksukhumvit11.com,sheratonsandiegohotel.com,imperialvienna.com,sheratonnashvilledowntown.com,hotel-marquesderiscal.com,wmontrealhotel.com,sheratonseattle.com,royalorchidsheraton.com,sheratonporto.com,wneworleans.com,stregismauritius.com,wwashingtondc.com,lemeridien-minaseyahi.com,westingrandfrankfurt.com,w-barcelona.es,stregisdoha.com,wnewyorktimessquare.com,sheratonvancouver.com,thewestinmichiganavenue.com,westinindianapolis.com,thewestindublin.com,sheratonsingapore.com,wparisopera.com,thegrittipalace.com,westinbayshore.com,westinchicago.com,westinkeywestresort.com,westinvegas.com,us.starwoodoffers.com,sheratonjumeirahbeach.com,plazaatheneebangkok.com,sheratonpalace.ru,stregisabudhabi.com,westincharlottehotel.com,elementtimessquare.com,stregissanfrancisco.com,deals.westin.com,lemeridienmalta.com,lemeridien-alaqah.com,westinbellevuedresden.com,wildhorsepassresort.com,westinnapa.com,sheratontelaviv.com,wlosangeles.com,lemeridienpiccadilly.co.uk,sheratoncentremontreal.com,latin-america.starwoodoffers.com,pulitzeramsterdam.com,sheratonparkanaheim.com,whoteldoha.com,wretreatmaldives.com,westinftlauderdalebeach.com,sheratonskyline.com,sheratonfiji.com,sheratonheathrowhotel.com,watlantamidtown.com,sheratonsuites.com,thewsandiegohotel.com,hotelprincedegalles.fr,sheratonnoosaresort.com,metropolpalace.com,westincapecoral.com,wminneapolishotel.com,sheratonnassau.com,stregisaspen.com,schlossfuschlsalzburg.com,watlantadowntown.com,translate.googleusercontent.com,sheratonkeywest.com,sheratonuniversal.com,sheratondoha.com,fourpointsbolzano.com,westinleipzig.com,wfrenchquarter.com,hotelfuerstenhofleipzig.com,wscottsdalehotel.com,lemeridiennuernberg.com,westinbluemountain.com,aloftabudhabi.com,westinsandiego.com,westinpoinsettgreenville.com,westinmissionhills.com,westinlakelasvegas.com,stregisbahiabeach.com,hotelelephantweimar.com,thewestinottawa.com,westincostanavarino.com,fourpointsbangkoksukhumvit.com,westinneworleanscanalplace.com,westinriverfrontbeavercreek.com,lemeridienkotakinabalu.com,bluepalace.gr,westincalgary.com,stregisdeervalley.com,sheratonlincolnharbor.com,sheratongolfroma.com,lemeridienkualalumpur.com,sheratontribeca.com,sheratonrome.com,sheratonlacaleta.com,sheratonphiladelphiadowntown.com,sheratoncasablanca.com,westinlosangelesairport.com,nakaislandphuket.com,westinjerseycitynewport.com,wchicagocitycenter.com,westinwashingtondccitycenter.com,sheratonnuernberg.com,westinorlandouniversal.com,wnewyorkunionsquare.com,hotelkamp.fi,sheratonabudhabihotel.com,westindenverdowntown.com,westingrandvancouver.com,sheratonlisboa.com,sheratonphoenixdowntown.com,sheratonalgarve.com,westincrowncenterkansascity.com,castillosonvidamallorca.com,lemeridienkhaolak.com,westinabudhabigolfresort.com,fourpointslax.com,westinpittsburgh.com,starwood-ap.cn,lemeridienlimassol.com,sheratonportsmouth.com,sheratonwestpark.com,hotel-mariacristina.com,lemeridienabudhabi.com,aloftdallasdowntown.com,princedegallesparis.com,sheratoncarlsbad.com,sheratonmiamiairport.com,aloftnewyorkbrooklyn.com,sheratonlosangelesdowntown.com,aloftchicagocitycenter.com,sheratonmadridmirasierra.com,goldenerhirsch.com,thehotelivy.com,watlantabuckhead.com,theparktowerknightsbridge.com,westinrichmond.com,whotelbangkok.com,sheratonbrooklyn.com,lemeridienmontecarlo.com,sheratonpuertoricohotelcasino.com,bristolvienna.com,westinsouthfielddetroit.com,login1.sheraton-surabaya.com,westingrandcayman.com,stregismardavall.com,westinohare.com,sheratonhuahin.com,westindallasfortworthairport.com,westinvalencia.com,thewestinkualalumpur.com,westintampaharbourisland.com,westinlongbeachhotel.com,sheraton-rio.com,sheratonoldsanjuan.com,thewestinedmonton.com,aloftmiamidoral.com,hotel-alfonsoxiii-sevilla.com,keratonattheplazajakarta.com,sheratonduesseldorfairport.com,fourpointssheikhzayedroad.com,lemeridiennice.com,wnewyorkdowntown.com,sheratonfortworth.com,fourpointssydney.com,lemeridienvilnius.com,westincincinnati.com,lemeridienbangkokpatpong.com,theluxurycollectionroadtrips.com,westinpalacemilan.com,sheratondubaimalloftheemirates.com,sheratonstationsquare.com,westincoralgables.com,stregishoustonhotel.com,wistanbul.com,lemeridienkohsamui.com,lemeridienparkhotelfrankfurt.com,westinsnowmass.com,westingaslamp.com,sheratonsyracuse.com,sheratonmyrtlebeach.com,westinprincetoronto.com,sheratonphiladelphiasocietyhill.com,thewestinnovascotian.com,sheratonparsippany.com,westinlangkawi.com,fourpointsorlandostudiocity.com,vanabellekohsamui.com,westineuropareginavenice.com,westinlakemary.com,sheratongunter.com,conventodoespinheiro.com,westinannapolis.com,sheratonsacramento.com,alofttallahassee.com,stregiswashingtondc.com,wstpetersburg.com,sheratonreadhouse.com,lemeridientahiti.com,sheratoncongressfrankfurt.com,sheratonkansascityhotel.com,fairfaxhoteldc.com,sheratonparkway.com,fourpointstimessquare.com,westinmammoth.com,lemeridienlavsplit.com,stregisfamilytraditions.com,westinvirginiabeach.com,leroyalmeridienabudhabi.com,thewestingalleriadallas.com,sheratontampariverwalk.com,lemeridienbudapest.com,westincolumbus.com,sheratoncavaliercalgary.com,westingovernormorris.com,deals.fourpoints.com,westingeorgetown.com,sheratonmallorcagolfhotel.com,westintampabay.com,sheratonfuschlseesalzburg.com,aloftbrussels.com,westinhuntsville.com,westinsohnaresort.com,sheraton.nl,westinatlantaairport.com,sheratonankara.com,sheratonprague.com,lemeridienchambers.com,sheratoninnerharbor.com,sheratoncavaliersaskatoon.com,aloftkualalumpursentral.com,westingrandesukhumvit.com,lemeridienphuketbeachresort.com,westinfinds.com,westinfortlauderdalehotel.com,sheratonsonoma.com,lemeridienbarcelona.com,sheratonmunichairport.com,stregisbangkok.com,lemeridienra.es,westinsiraybay.com,sheratonstockholm.com,fourpointsfrenchquarter.com,westinlombard.com,westindallasparkcentral.com,westinbellevuehotel.com,sheratonparisairport.com,sheratonatlanticcity.com,lemeridiendallasstoneleigh.com,sheratonsaopaulowtc.com,stregisaficionado.com,fourpointsbrentwood.com,sheratonsalzburg.com,fourpointssihlcity.com,aloftmilwaukeedowntown.com,westinalexandria.com,westingalleriahoustonhotel.com,aloftcharlotteuptown.com,hoteldesindes.nl,sheratonarlingtonhotel.com,westinstmaarten.com,sheratoncolumbia.com,westinflorence.com,westinnorthshore.com,kinggeorgeathens.com,sheratonhamilton.com,sheratonorlandonorth.com,westinarlingtongateway.com,sheratonpelikanhannover.com,westindragonaramalta.com,fourpointsdc.com,sheratontysonscorner.com,westinsouthcoastplaza.com,hotelkamp.com,fourpointshistoricsavannah.com,westinstonebriar.com,lemeridienatlantaperimeter.com,sheratonfairplex.com,westinmemphisbealestreet.com,westinatlantanorth.com,aloftchicagoohare.com,sheratonhanoi.com,sheratonakron.com,sheratonnorfolkwaterside.com,sheratonlajolla.com,sheratoncommander.com,sheratonsuiteshouston.com,westinriverwalksanantonio.com,romanoscostanavarino.com,aloftaustinatthedomain.com,sheratonburlington.com,alofttucsonuniversity.com,wstpetersburg.ru,sheratonbalikuta.com,sheratonokc.com,lemeridienbruxelles.fr,aloftharlem.com,sheratonstlouiscitycenter.com,canyonsuites.com,fourpointssohovillage.com,sheratonpattayaresort.com,sheratonpasadena.com,sheratonaddis.com,lemeridienbarcelona.es,westinnationalharbor.com,sheratonraleigh.com,lemeridienalkhobar.com,sheratonmahwah.com,westinbuckheadatlanta.com,sheratonstockholm.se,sheratonoffenbach.com,sheratongenova.com,sheratoncolumbuscapitolsquare.com,aloftnashvillewestend.com,sheratonsuitesfortlauderdale.com,aloftportlandairport.com,sheratonessen.com,sheratonbirmingham.com,sheratonkrabi.com,sheratondeiradubai.com,stregisflorence.com,sheratonbaltimorecitycenter.com,aloftchapelhill.com,wparisopera.fr,sheratonindianapoliscitycentre.com,sheratonelpaular.com,westinportland.com,fourpointsbarcelonadiagonal.com,westinchicagonorthwest.com,sheratonbaltimorenorth.com,sheratonmeadowlands.com,fourpointstorontoairport.com,lemeridienfishermanscove.com,sheratonhuahinpranburi.com,westinhoustondowntown.com,sheratongambiahotel.com,beatthetimer.com,sheratonmilanmalpensa.com,thewestinparis.fr,sheratonnicolausbari.com,hotel-alfonsoxiii-seville.com,fourpointschelsea.com,deals.alofthotels.com,whoboken.com,sheratontucson.com,sheraton-barra.com,alofttulsa.com,westintorontoairport.com,sheratonbursahotel.com,sheratonmadison.com,lemeridien-barbarons.com,aloftarundelmills.com,caladivolpe.com,sheratondavoshotelwaldhuus.com,sheratontorontoairport.com,sheratonsuitesplantation.com,sheratonannarbor.com,fourpointsmunichcentral.com,westinphoenixdowntown.com,westinpuntacana.com,sheratonoverlandpark.com,sheratoncountryclubplaza.com,stregisrome.com,aloftvaughanmills.com,fourpointsdestinfortwaltonbeach.com,sheratonindianapoliskeystonecrossing.com,aloftsanantonioairport.com,fourpointsdetroitairport.com,sheratonfitness.com,sheratonframingham.com,fourpointsburdubai.com,sheratonbrusselsairport.com,sheratonsuitesgalleriaatlanta.com,sheratonsharm.com,sheratonmissionvalley.com,sheratonmilanmalpensa.it,sheratonottawa.com,westinsavannahspa.com,sheratonsteamboatresort.com,sheratonclaytonhotel.com,lemeridienchiangrai.com,westinrome.com,fourpointsashevilledowntown.com,sheratonharrisburghershey.com,lemeridiennfis.com,sheratonbratislava.sk,fourpointsbiloxi.com,arionresortathens.com,sheratonclubdespins.com,sheratonvancouverairport.com,westinedinagalleria.com,aloftmountlaurel.com,aloftcharlotteballantyne.com,fourpointsstcatharines.com,sheraton-somabay.com,fourpointsolympiapark.com,sheratonbangalore.com,lemeridienbrussels.com,sheratongatewaytorontoairport.com,sheratonsuitesdallas.com,sheratonorlandodowntown.com,aloftlascolinas.com,sheratonsuitescolumbus.com,westinbwi.com,sheratonsuitesalexandria.com,aloftbirminghamsohosquare.com,sheratonagourahills.com,sheratonbrussels.com,westinhoustonmemorialcity.com,sheratonguildford.com,elementmiamiairport.com,sheratondianamajestic.it,sheratonanchorage.com,sheratonstamford.com,sheratontarrytown.com,aloftplano.com,westinshanghai.com,sheratoniowacity.com,sheratonpadova.com,sheratonbwiairport.com,sheratonanaheimsouth.com,sheratonmilwaukeebrookfield.com,sheratonsuiteswilmington.com,sheratoncrescent.com,sheratonnhatrang.com,sheratonlagos.com,westintysonscornerhotel.com,sheratonamsterdamairporthotel.com,aloftnashvillecoolsprings.com,sheratondabahia.com,aloftbroomfielddenver.com,lemeridienibom.com,westindulles.com,sheratondianamajestic.com,sheratoncerritos.com,sheratonalbuquerqueuptown.com,lemeridienangkor.com,westinprinceton.com,sheratonsilverspring.com,sheratonsaltlakecityhotel.com,aloftfrisco.com,aloftchesapeake.com,fourpointscalgarywest.com,lemeridienchiangmai.com,fourpointslondonontario.com,sheratonvitoria.com,fourpointscocoabeach.com,aloftmontrealairport.com,aloftcharlestonairport.com,sheratonannapolis.com,sheratonparisairport.fr,westinmumbaigardencity.com,fourpointslagos.com,fourpointsmilan.com,sheratonsuitestampaairport.com,westingurgaon.com,elementomahamidtowncrossing.com,sheratonimperialkualalumpur.com,vedema.gr,sheratoncolonial.com,sheratonedison.com,aloftjacksonvilletapestrypark.com,lemeridienversailleshotel.com,fourpointsdowntowndubai.com,sheratonneuesschloss.com,sheraton-poa.com,sheratonrtp.com,westinathens.com,sheratonmemphisdowntown.com,sheratonatlantaairport.com,sheratonlouisvilleriverside.com,hoteldesindesthehague.com,fourpointstempe.com,sheratonmiramarresort.com,westinoakshouston.com,sheratongranddfwairport.com,sheratonwilmingtonsouth.com,sheratonbratislava.com,sheratoneatontown.com,sheratonoran.com,sheraton-asuncion.com,lemeridiennoumea.com,westindetroitmetroairport.com,sheratonrhodesresort.com,westinpunekoregaonpark.com,sheratontampaeast.com,sheratonkuwait.com,sheratonneedham.com,sheratonvirginiabeach.com,fourpointscalgaryairport.ca,elementhoustonvintagepark.com,aloftphoenixairport.com,lemeridienrimini.com,fourpointszaporozhye.com,sheratonbrookhollow.com,fourpointsyork.com,lemeridienamman.com,aloftontario-rc.com,westinportlandharborview.com,fourpointssacramentoairport.com,westinsydney.com,sheratonammanalnabil.com,leroyalmansourmeridien.com,sheratonriyadh.com,sheratonportlandairport.com,westinvancouverairport.com,sheratonpretoria.com,lemeridien-pyramids.com,fourpointssanantonionorthwest.com,wretreatbali.com,sheratonjfk.com,sheratonbellevue.com,sheratonrichmondparksouth.com,lemeridienogeyiplace.com,sheratonamsterdamairport.com,lemeridiendahab.com,fourpointssandiegodowntown.com,hotelpulitzeramsterdam.nl,wboston.com,sheratonreston.com,sheratonsunnyvale.com,aloftbursa.com,sheratonjacksonville.com,fourpointsraleighdurhamairport.com,westinbirmingham.com,fourpointskingston.com,fourpointskelownaairport.com,sheratonhoustonwest.com,fourpointssanrafael.com,sheratonchicagoohare.com,sheratonphoenixairport.com,fourpointslosangeleswestside.com,reviews.starwoodpromos.com,westinshanghai.cn,sheratonbatumi.com,sheratondetroitmetroairport.com,sheratonsuiteselkgrove.com,fourpointsmilwaukeenorth.com,sheratonmetairieneworleans.com,pinecliffsresidencesuites.com,sheratonminneapolismidtown.com,sheratondammam.com,haciendauayamon.com,sheratonomaha.com,westinreston.com,sheratondenverwest.com,sheratonabuja.com,fourpointsvictoriagateway.com,lemeridiennice.fr,fourpointslouisvilleairport.com,westinpalacemilan.it,fourpointssanantoniodowntown.com,sheratonbrusselsairport.be,elementarundelmills.com,sheratonstpaulwoodbury.com,sheratonsanjose.com,lemeridienbalijimbaran.com,sheratonprovidenceairport.com,fourpointstallahasseedowntown.com,lemeridien-jeddah.com,aloftbwi.com,sheratonlaguardiaeast.com,mobile.royal-hawaiian.com,sheratonsaigon.com,alofttempe.com,sheratonwashingtonnorth.com,sheratonjeddah.com,fourpointscharlottepineville.com,sheratonalbuquerqueairport.com,fourpointsedmontonsouth.com,sheratonbruxelles.fr,westinhyderabadmindspace.com,fourpointswestlafayette.com,sheratonminneapoliswest.com,fourpointsrichmondairport.com,fourpointspleasanton.com,sheratonaugusta.com,fourpointsbangorairport.com,lemeridienbudapest.hu,sheratondubaicreek.com,sheratonsuitessandiego.com,fourpointscambridgekitchener.com,fourpointsbrussels.com,sheratonmidwestcity.com,sheratontiranahotel.com,sheratonbuckscounty.com,aloftbruxelles.com,haciendasanjosecholul.com,sheratondenvertech.com,sheratonkampala.com,fourpointsmiamibeach.com,sheratonmontrealairport.com,sheratoneriebayfront.com,stregissuites.com,residences.starwoodpromos.com,sheratonstonebriar.com,sheratonbrussels.be,sheratonnorthbrook.com,alofttulsadowntown.com,fourpointscaguas.com,sheratontunis.com,sheratonbahrain.com,aloftsanfranciscoairport.com,sheratonmontazah.com,fourpointswinnipegairport.com,sheratonbruxellesaeroport.fr,sheratonpleasanton.com,elementdfwnorth.com,aloftdullesairportnorth.com,pitrizzahotel.com,lemeridienheliopolis.com,lemeridienoran.com,thegrandmauritian.com,fourpointsmanchesterairport.com,sheratonherndondulles.com,sheratonphiladelphiaairport.com,mobile.stregisprinceville.com,fourpointsmississaugameadowvale.com,mobile.sheraton-waikiki.com,fourpointskalamazoo.com,fourpointsvancouverairport.com,deals.whotels.com,stregisgrandtour.com,aloftjacksonvilleairport.com,fourpointshalifax.com,haciendatemozon.com,aloftcupertino.com,westinplayabonita.com,fourpointswinnipegsouth.com,131.253.14.98,wretreatkohsamui.com,elementewing.com,hotelexcelsiornapoli.com,fourpointsedmontongateway.com,fourpointstorontomississauga.com,fourpointschattanooga.com,wildwoodsnowmass.com,lemeridienmakkah.com,fourpointssandakan.com,aloftclevelanddowntown.com,hotelcervocostasmeralda.com,ch.tbe.taleo.net,sheratonpraha.cz,buesingpalais.de,starwood-live.feedmagnet.com,aloftbrussels.be,w-barcelona.cat,aloftsiliconvalley.com,fourpointstucsonairport.com,romazzinohotel.com,aloftorlandodowntown.com,fourpointsriyadhkhaldia.com,lemeridienbrussels.be,fourpointshobbyairport.com,fourpointslongislandcity.com,global.starwoodoffers.com,aloftbolingbrook.com,draft.livecms.biz,aloftminneapolis.com,haciendasantarosa.com,lemeridienra.cat,lemeridien-douala.com,sheratonbijao.com,131.253.14.66,sheratondreamlandhotel.com,wtaipei.jp,fourpointssanantonioairport.com,fourpointsbakersfield.com,fourpointspittsburghairport.com,fourpointspenang.com,sheratondjibouti.com,fourpointssiliconvalley.com,mobile.sheraton-maui.com,sheratonluxor.com,fourpointsbostonloganairport.com,westinhamburg.com,lemeridienrendama.com,westinmelbourne.com,aloftgreenbay.com,webcache.googleusercontent.com,fourpointsbrussels.be,aloftmiamibrickell.com,aloftleawoodoverlandpark.com,hotelkamp.ru,fourpointskuwait.com,fourpointsminneapolisairport.com,fourpointsmontevideo.com,sheratonmetechipalace.com,starwoodpromos.dev.livecms.biz,china-spg.com,aloftrogersbentonville.com,meeting-in-frankfurt.com,sheratonhartfordsouth.com,wtaipei.co.kr,londonluxuryhoteldeals.com,fourpointsperth.com,canada.starwoodoffers.com,westinsacramento.com,sheratondetroitnovi.com,fourpoints-macae.com,aloftwinchester.com,sheratonlibertador.com,mobile.sheraton-kauai.com,westinpalacemadrid.ru,fourpointsedmontonairport.com,sheratonbakuairport.com,wsantiagohotel.com";
s.linkInternalFilters = s.linkInternalFilters + "," + getLinkInternalDomain(location.href);
s.linkLeaveQueryString = true;
s.linkTrackVars = "None";
s.linkTrackEvents = "None";

/* Form Analysis Config */
s.formList = "reservationForm"; // THESE WILL NEED TO BE UPDATED
s.trackFormList = true;
s.trackPageName = true;
s.useCommerce = true;
s.varUsed = "eVar28";
s.eventList = "event21,event22,event23"; //Abandon,Success,Error

/* Function to parse the URL and return the domain for linkInternalFilter string*/
function getLinkInternalDomain(urlString) {
    var urlPattern = new RegExp("(http|https)://(.*?)/.*$");
    var parsedUrl = urlString.match(urlPattern);
    return parsedUrl[2];
}

function getBrandCode() {
    if (location.href.indexOf("/preferredguest/") > -1)
        return "SPG";
    else if (location.href.indexOf("/westin/") > -1)
        return "WI";
    else if (location.href.indexOf("/whotels/") > -1)
        return "WH";
    else if (location.href.indexOf("/lemeridien/") > -1)
        return "MD";
    else if (location.href.indexOf("/luxury/") > -1)
        return "LC";
    else if (location.href.indexOf("/sheraton/") > -1)
        return "SI";
    else if (location.href.indexOf("/stregis/") > -1)
        return "ST";
    else if (location.href.indexOf("/fourpoints/") > -1)
        return "4P";
    else if (location.href.indexOf("/element/") > -1)
        return "EL";
    else if (location.href.indexOf("/alofthotels/") > -1)
        return "AL";
    else if (location.href.indexOf("/corporate/") > -1)
        return "CORP";
    else if (location.href.indexOf("/pro/") > -1)
        return "PRO";
    else if (location.href.indexOf("/resorts/") > -1)
        return "RST";
    else if (location.href.indexOf("/bestrate/") > -1)
        return "BRG";
    else
        return "CORP";
}

/* Plugin: DynamicObjectIDs
Dynamic Object IDs plugin will improve click map functionality.  This is a tool that business users use to see stats,
in real time, for the particular page they are viewing.  This plugin improves flash and other dynamic link tracking ->
provided by Omniture
*/
function s_getObjectID(o) {
    var ID = o.href;
    return ID;
}
s.getObjectID = s_getObjectID;


function getDateByFormat(fieldString, dateFormatString) {
    var date = new Date();
    
    var dateFormatString = dateFormatString.toLowerCase();
    var hasSlashOrDash = false;
    var fieldString;
    
    if (fieldString.search("/") > 0) {
        var dateValues = fieldString.split("/");
        hasSlashOrDash = true;
    } else if (fieldString.search("-") > 0) {
        var dateValues = fieldString.split("-");
        hasSlashOrDash = true;
    } else if (fieldString.indexOf(".") >= 0) {
        var dateValues = fieldString.split(".");
    } else if (fieldString != "") {
        var dateValues = new Array(fieldString);
    } else if (fieldString == "") {
        date.setTime(Date.parse(dateFormatString));
        return date;
    }
    
    
    switch (dateFormatString) {
        case 'mm/dd/yyyy':
            if (dateValues[0])
                month = dateValues[0];
            if (dateValues[1])
                day = dateValues[1];
            if (dateValues[2])
                year = dateValues[2];
            break;
        case 'dd/mm/aaaa':
        case 'jj/mm/aaaa':
        case 'gg/mm/aaaa':
        case 'tt.mm.jjjj':
        case 'dd/mm/jjjj':
        case 'dd.mm.rrrr':
        case 'gg/aa/yyyy':
            if (dateValues[0])
                day = dateValues[0];
            if (dateValues[1])
                month = dateValues[1];
            if (dateValues[2])
                year = dateValues[2];
            break;
        case 'yyyy/mm/dd':
            if (dateValues[0])
                year = dateValues[0];
            if (dateValues[1])
                month = dateValues[1];
            if (dateValues[2])
                day = dateValues[2];
            break;
        case 'yyyy/dd/mm':
            if (dateValues[0])
                year = dateValues[0];
            if (dateValues[1])
                day = dateValues[1];
            if (dateValues[2])
                month = dateValues[2];
            break;
        case 'dd.mm.yyyy':
        case 'dd/mm/yyyy':
            if (dateValues[0])
                day = dateValues[0];
            if (dateValues[1])
                month = dateValues[1];
            if (dateValues[2])
                year = dateValues[2];
            break;
        case '\u0434\u0434.\u043c\u043c.\u0433\u0433\u0433\u0433':
            if (dateValues[0])
                day = dateValues[0];
            if (dateValues[1])
                month = dateValues[1];
            if (dateValues[2])
                year = dateValues[2];
            break;
        case "yy\u5E74mm\u6708dd\u65E5":
            if (!hasSlashOrDash) {
                year = fieldString.substr(0, 2);
                month = fieldString.substr(3, 2);
                day = fieldString.substr(6, 2);
            } else {
                if (dateValues[0])
                    year = dateValues[0];
                if (dateValues[1])
                    month = dateValues[1];
                if (dateValues[2])
                    day = dateValues[2];
            }
            break;
        case "yy\uB144mm\uC6D4dd\uC77C":
            if (!hasSlashOrDash) {
                year = fieldString.substr(0, 2);
                month = fieldString.substr(3, 2);
                day = fieldString.substr(6, 2);
            } else {
                if (dateValues[0])
                    year = dateValues[0];
                if (dateValues[1])
                    month = dateValues[1];
                if (dateValues[2])
                    day = dateValues[2];
            }
            break;
        default:
            if (dateValues[0])
                month = dateValues[0];
            if (dateValues[1])
                day = dateValues[1];
            if (dateValues[2])
                year = dateValues[2];
            break;
    }
    date = year + "-" + month + "-" + day;
    return date;
}

/* Page Load Time Calculation*/
function s_getLoadTime() {
    if (!window.s_loadT) {
        var current = new Date().getTime(), 
        perf = window.performance ? performance.timing : 0, 
        total = perf ? perf.requestStart : window.inHeadTS || 0;
        
        s_loadT = total ? (((current - total) / 1000).toFixed(2)) : '';
    }
    if (0 < s_loadT < 20) {
        return s_loadT;
    } else if (s_loadT > 20) {
        return "20+";
    }
}

/* Plugin Config */
s.usePlugins = true;
function s_doPlugins(s) {


    /* Pseudo logic - Pass unique custom events on each booking page for fallout analysis */
    if (location.href.indexOf("/reservations/booking/index.html") > -1) {
        s.events = s.apl(s.events, 'event16', ',', 1);
    } 
    else if (location.href.indexOf("/reservations/booking/verify.html") > -1) {
        s.events = s.apl(s.events, 'event17', ',', 1);
    } 
    else if (location.href.indexOf("/reservations/booking/confirm.html") > -1) {
        s.events = s.apl(s.events, 'event18', ',', 1);
    } 
    else {
    // Nothing for now
    }

    /* Page View Event
    Page View event to flag page views and correlate with conversion variables -> s.apl provided by OMTR
    */
    s.events = s.apl(s.events, 'event9', ',', 1);

    /* Plugin: Get Visit Start */
    var temp_prop = s.getVisitStart("s_visit");
    if (temp_prop == "1") {
        s.events = s.apl(s.events, 'event19', ',', 1);
    }

    /* Plugin: Get Time To Complete v.0.4 */
    if (s.events.indexOf('event19') > -1)
        s.prop38 = 'start';
    
    if (s.events.indexOf('purchase') > -1)
        s.prop38 = 'stop';
    
    s.prop38 = s.getTimeToComplete(s.prop38, 'ttc', 0);

    /* Plugin: Get Days Since Last Visit v 1.0
    This plugin allows us to see when the last visit happened across all of our eVar and sProps captured -> provided by OMTR
    */
    s.eVar44 = s.prop44 = s.getDaysSinceLastVisit();

    /* Plugin: Form Analysis v.2.1 */
    s.setupFormAnalysis();

    /* Plugin: Time Parting v.1.4
    This plugin allows us to see, by hour, day of week, weekday/wknd, what variables are getting the most traffic -> provided by OMTR
    */
    var curdate = new Date();
    var eVar13Day = (curdate.getDate() < 10) ? '0' + curdate.getDate() : curdate.getDate();
    var eVar13Month = ((curdate.getMonth() + 1) < 10) ? '0' + (curdate.getMonth() + 1) : (curdate.getMonth() + 1);
    var eVar13Year = (curdate.getYear() < 1000) ? curdate.getYear() + 1900 : curdate.getYear();
    var eVar13Temp = eVar13Month + ":" + eVar13Day + ":" + eVar13Year;
    
    var temphr = s.getTimeParting('h', '-5', curdate.getFullYear()); // set hour of day
    var tempday = s.getTimeParting('d', '-5', curdate.getFullYear()); // set day of week
    var tempweek = s.getTimeParting('w', '-5', curdate.getFullYear()); // Set weekend vs. weekday
    if (temphr) {
        s.eVar42 = s.prop49 = tempweek + ":" + tempday + ":" + temphr;
    }

    /* Plugin: New vs Repeat User
    This plugin allows us to see whether a user is new or a repeat (without being logged in) -> provided by OMTR
    */

    // s.prop47=s.getNewRepeat();
    var brandCode = getBrandCode();
    s.prop47 = s.eVar72 = s.getNewRepeat();
    s.prop52 = s.eVar73 = brandCode + "_" + s.getNewRepeat(30, brandCode + "_nr");

    /* Plugin: Get Visit Number v.2.0
    This plugin allows us to see how often a user sees a particular page(s) in each visit as well as correlate/subrelate by other key data points.
    */
    s.prop36 = s.eVar37 = s.getVisitNum();

    /* Search Tracking
    This adds tracking to monitor sort Order (which is most popular, which leads to highest conversion, etc)
    as well as takes the dates searched and captures them ->
    */
    var temp_sortOrder = s.getQueryParam("sortOrder");
    
    if (temp_sortOrder) {
        sortName = "Sort-";
        if (temp_sortOrder == 0) {
            sortName = sortName + "Avail";
        } else if (temp_sortOrder == 7) {
            sortName = sortName + "HiLow";
        } else if (temp_sortOrder == 3) {
            sortName = sortName + "LowHi";
        } else if (temp_sortOrder == 2) {
            sortName = sortName + "Name";
        } else if (temp_sortOrder == 1) {
            sortName = sortName + "Distance";
        } else {
            sortName = temp_sortOrder;
        }
        if (s.pageName.indexOf(sortName) == -1) {
            s.pageName += ":" + sortName
        }
        // Lets find another variable to capture this as this overrides the MVT layout number
        s.eVar49 = temp_sortOrder;
    }
    
    var temp_arrivalDate = s.getQueryParam("arrivalDate");
    var temp_departureDate = s.getQueryParam("departureDate");
    var locale = s.getQueryParam("localeCode");
    var dateFormatString = "MM/DD/YYYY";
    
    if (temp_arrivalDate !== "" && location.href.indexOf("/rates/") == -1) {
        dateFormatString = getDateFormatByLocale(locale);
        temp_arrivalDate = getDateByFormat(temp_arrivalDate, dateFormatString);
    }
    
    if (temp_departureDate !== "" && location.href.indexOf("/rates/") == -1) {
        temp_departureDate = getDateByFormat(temp_departureDate, dateFormatString);
    }
    
    if (temp_arrivalDate) {
        s.prop50 = s.eVar50 = temp_arrivalDate + ":" + temp_departureDate; //dates searched
    }
    
    
    if (!s.campaign) {
        var em_c = s.getQueryParam("EM");
        var ps_c = s.getQueryParam("PS");
        s.campaign = (em_c.length > 0 && ps_c.length > 0) ? em_c + ":" + ps_c : em_c + ps_c;
    }
    ;
    
    if (!s.eVar30) {
        s.eVar30 = s.getQueryParam("IM");
    }
    
    if (!s.eVar31) {
        var es_c = s.getQueryParam("ES");
        var ep_c = s.getQueryParam("EP");
        s.eVar31 = (es_c.length > 0 && ep_c.length > 0) ? es_c + ":" + ep_c : es_c + ep_c;
    }

    /*
     * If currency code change from the default, the the event need to set as event34
     */
    var temp_currencyCode = s.getQueryParam("currencyCode");
    if (temp_currencyCode) {
        s.events = "event34";
    }
    
    s.prop62 = s_getLoadTime();
    /*
	 7/7/2011 Keystone Changes: URL --> Prop63, prop13 --> eVar63
	*/
    s.prop63 = (window.location.hostname + (window.location.pathname || "")).toLowerCase();
    s.eVar63 = s.prop13;
    var tempPageName = s.pageName;
    
    s.prop23 = s.getPercentPageViewed();
    
    s.tnt = s.trackTNT();
    s.plugins = "";
    
    if (!(location.href.indexOf("/reservations/booking/confirm.html") > -1 || 
    location.href.indexOf("/reservations/booking/cash_points/confirmation.html") > -1 || 
    location.href.indexOf("/reservations/booking/points/confirmation.html") > -1)) {
        s.dynComp();
    }
    s.pageName = tempPageName;
    s.prop20 = s.getPreviousValue(s.pageName, 'gpv_pn', '');
}

s.doPlugins = s_doPlugins

var temp_ua = navigator.userAgent;
var temp_dt = "";
if (temp_ua.indexOf("iPod") > -1) {
    temp_dt = "iPod";
} 
else if (temp_ua.indexOf("iPad") > -1) {
    temp_dt = "iPad" + "|" + screen.width + "x" + screen.height;
} 
else if (temp_ua.indexOf("iPhone") > -1) {
    temp_dt = "iPhone" + "|" + screen.width + "x" + screen.height;
} 
else if (temp_ua.indexOf("BlackBerry") > -1 || temp_ua.indexOf("BB10") > -1) {
    temp_dt = "Blackberry Mobile";
} 
else if (temp_ua.indexOf("PlayBook") > -1) {
    temp_dt = "Blackberry Tablet";
} 
else if (temp_ua.indexOf("Tablet") > -1 || temp_ua.indexOf("Galaxy Nexus") > -1) {
    temp_dt = "Android Tablet";
} 
else if (temp_ua.indexOf("Mobile") > -1 || temp_ua.indexOf("Nexus") > -1) {
    temp_dt = "Android Mobile";
} 
else {
    temp_dt = "Desktop";
}
;
s.prop75 = temp_dt;

if (document.referrer != '' && document.referrer != 'undefined' && !(document.referrer.indexOf("starwoodhotels.com") > -1)) {
    var refStringArray = document.referrer.split('/');
    if (refStringArray != 'undefined' && refStringArray.length > 0) {
        s.prop24 = s.eVar29 = refStringArray[2];
    }
}


/************************** PLUGINS SECTION *************************/
/* You may insert any plugins you wish to use here.     */

/************************ Test&Target Plugin Start *************************/
/*
* TNT Integration Plugin v1.0
* v - Name of the javascript variable that is used. Defaults to s_tnt
(optional)
* p - Name of the url parameter. Defaults to s_tnt (optional)
* b - Blank Global variable after plugin runs. Defaults to true (Optional)
*/
s.trackTNT = new Function("v", "p", "b", "" 
+ "var s=this,n='s_tnt',p=p?p:n,v=v?v:n,r='',pm=false,b=b?b:true;if(s." 
+ "getQueryParam){pm=s.getQueryParam(p);}if(pm){r+=(pm+',');}if(s.wd[v" 
+ "]!=undefined){r+=s.wd[v];}if(b){s.wd[v]='';}return r;");

/*
 * Plugin: Dynamic Variable Compression v1.0
 * Shortens the image request by setting dynamic
 * variables for repeated values.
*/
s.dcVars = new Function("c", "" 
+ "vl='pageName,purchaseID,channel,server,pageType,campaign,state,zip," 
+ "events,products,transactionID';d=s.split(vl,',');for(a=1;a<=75;a++)" 
+ "{f=c=='prop'?'c':'v';pa=c+a;if(typeof s[pa]!='undefined'&&s[pa]!='')" 
+ "{for(b=a;b<=75;b++){if(a==b){b++}pb=c+b;if(typeof s[pb]!='undefined" 
+ "'&&s[pb]!=''){if(s[pa]==s[pb]&&s[pb].indexOf('D=')==-1){s[pb]='D='+" 
+ "f+a;}}}for(e=0;e<d.length;e++){pnc=d[e];if(typeof s[pnc]!='undefine" 
+ "d'&&s[pnc]!='')if(s[pa]==s[d[e]]&&s[pnc].indexOf('D=')==-1){s[pnc]=" 
+ "'D='+f+a;}}}}");
s.dynComp = new Function("", "" 
+ "s.dcVars('prop');s.dcVars('eVar');");

/*
* Plugin: getQueryParam 2.4
*/
s.getQueryParam = new Function("p", "d", "u", "h", "" 
+ "var s=this,v='',i,j,t;d=d?d:'';u=u?u:(s.pageURL?s.pageURL:s.wd.loca" 
+ "tion);if(u=='f')u=s.gtfs().location;while(p){i=p.indexOf(',');i=i<0" 
+ "?p.length:i;t=s.p_gpv(p.substring(0,i),u+'',h);if(t){t=t.indexOf('#" 
+ "')>-1?t.substring(0,t.indexOf('#')):t;}if(t)v+=v?d+t:t;p=p.substrin" 
+ "g(i==p.length?i:i+1)}return v");
s.p_gpv = new Function("k", "u", "h", "" 
+ "var s=this,v='',q;j=h==1?'#':'?';i=u.indexOf(j);if(k&&i>-1){q=u.sub" 
+ "string(i+1);v=s.pt(q,'&','p_gvf',k)}return v");
s.p_gvf = new Function("t", "k", "" 
+ "if(t){var s=this,i=t.indexOf('='),p=i<0?t:t.substring(0,i),v=i<0?'T" 
+ "rue':t.substring(i+1);if(p.toLowerCase()==k.toLowerCase())return s." 
+ "epa(v)}return''");

/*
 * Utility Functions: p_gh, split, apl, replace, read & write combined cookies
 */
s.p_gh = new Function("" 
+ "var s=this;if(!s.eo&&!s.lnk)return '';var o=s.eo?s.eo:s.lnk,y=s.ot(" 
+ "o),n=s.oid(o),x=o.s_oidt;if(s.eo&&o==s.eo){while(o&&!n&&y!='BODY'){" 
+ "o=o.parentElement?o.parentElement:o.parentNode;if(!o)return '';y=s." 
+ "ot(o);n=s.oid(o);x=o.s_oidt}}return o.href?o.href:'';");
s.split = new Function("l", "d", "" 
+ "var i,x=0,a=new Array;while(l){i=l.indexOf(d);i=i>-1?i:l.length;a[x" 
+ "++]=l.substring(0,i);l=l.substring(i+d.length);}return a");
s.apl = new Function("L", "v", "d", "u", "" 
+ "var s=this,m=0;if(!L)L='';if(u){var i,n,a=s.split(L,d);for(i=0;i<a." 
+ "length;i++){n=a[i];m=m||(u==1?(n==v):(n.toLowerCase()==v.toLowerCas" 
+ "e()));}}if(!m)L=L?L+d+v:v;return L");
s.repl = new Function("x", "o", "n", "" 
+ "var i=x.indexOf(o),l=n.length;while(x&&i>=0){x=x.substring(0,i)+n+x." 
+ "substring(i+o.length);i=x.indexOf(o,i+l)}return x");
s.c_rr = s.c_r;
s.c_r = new Function("k", "" 
+ "var s=this,d=new Date,v=s.c_rr(k),c=s.c_rr('s_pers'),i,m,e;if(v)ret" 
+ "urn v;k=s.ape(k);i=c.indexOf(' '+k+'=');c=i<0?s.c_rr('s_sess'):c;i=" 
+ "c.indexOf(' '+k+'=');m=i<0?i:c.indexOf('|',i);e=i<0?i:c.indexOf(';'" 
+ ",i);m=m>0?m:e;v=i<0?'':s.epa(c.substring(i+2+k.length,m<0?c.length:" 
+ "m));if(m>0&&m!=e)if(parseInt(c.substring(m+1,e<0?c.length:e))<d.get" 
+ "Time()){d.setTime(d.getTime()-60000);s.c_w(s.epa(k),'',d);v='';}ret" 
+ "urn v;");
s.c_wr = s.c_w;
s.c_w = new Function("k", "v", "e", "" 
+ "var s=this,d=new Date,ht=0,pn='s_pers',sn='s_sess',pc=0,sc=0,pv,sv," 
+ "c,i,t;d.setTime(d.getTime()-60000);if(s.c_rr(k)) s.c_wr(k,'',d);k=s" 
+ ".ape(k);pv=s.c_rr(pn);i=pv.indexOf(' '+k+'=');if(i>-1){pv=pv.substr" 
+ "ing(0,i)+pv.substring(pv.indexOf(';',i)+1);pc=1;}sv=s.c_rr(sn);i=sv" 
+ ".indexOf(' '+k+'=');if(i>-1){sv=sv.substring(0,i)+sv.substring(sv.i" 
+ "ndexOf(';',i)+1);sc=1;}d=new Date;if(e){if(e.getTime()>d.getTime())" 
+ "{pv+=' '+k+'='+s.ape(v)+'|'+e.getTime()+';';pc=1;}}else{sv+=' '+k+'" 
+ "='+s.ape(v)+';';sc=1;}if(sc) s.c_wr(sn,sv,0);if(pc){t=pv;while(t&&t" 
+ ".indexOf(';')!=-1){var t1=parseInt(t.substring(t.indexOf('|')+1,t.i" 
+ "ndexOf(';')));t=t.substring(t.indexOf(';')+1);ht=ht<t1?t1:ht;}d.set" 
+ "Time(ht);s.c_wr(pn,pv,d);}return v==s.c_r(s.epa(k));");
/*
 * DynamicObjectIDs v1.5: Setup Dynamic Object IDs based on URL
 */
s.setupDynamicObjectIDs = new Function("" 
+ "var s=this;if(!s.doi){s.doi=1;if(s.apv>3&&(!s.isie||!s.ismac||s.apv" 
+ ">=5)){if(s.wd.attachEvent)s.wd.attachEvent('onload',s.setOIDs);else" 
+ " if(s.wd.addEventListener)s.wd.addEventListener('load',s.setOIDs,fa" 
+ "lse);else{s.doiol=s.wd.onload;s.wd.onload=s.setOIDs}}s.wd.s_semapho" 
+ "re=1}");
s.setOIDs = new Function("e", "" 
+ "var s=s_c_il[" + s._in + "],b=s.eh(s.wd,'onload'),o='onclick',x,l,u,c,i" 
+ ",a=new Array;if(s.doiol){if(b)s[b]=s.wd[b];s.doiol(e)}if(s.d.links)" 
+ "{for(i=0;i<s.d.links.length;i++){l=s.d.links[i];c=l[o]?''+l[o]:'';b" 
+ "=s.eh(l,o);z=l[b]?''+l[b]:'';u=s.getObjectID(l);if(u&&c.indexOf('s_" 
+ "objectID')<0&&z.indexOf('s_objectID')<0){u=s.repl(u,'\"','');u=s.re" 
+ "pl(u,'\\n','').substring(0,97);l.s_oc=l[o];a[u]=a[u]?a[u]+1:1;x='';" 
+ "if(c.indexOf('.t(')>=0||c.indexOf('.tl(')>=0||c.indexOf('s_gs(')>=0" 
+ ")x='var x=\".tl(\";';x+='s_objectID=\"'+u+'_'+a[u]+'\";return this." 
+ "s_oc?this.s_oc(e):true';if(s.isns&&s.apv>=5)l.setAttribute(o,x);l[o" 
+ "]=new Function('e',x)}}}s.wd.s_semaphore=0;return true");
/*
 * Plugin: getQueryParam 2.4
 */
/*s.getQueryParam=new Function("p","d","u","h",""
+"var s=this,v='',i,j,t;d=d?d:'';u=u?u:(s.pageURL?s.pageURL:s.wd.loca"
+"tion);if(u=='f')u=s.gtfs().location;while(p){i=p.indexOf(',');i=i<0"
+"?p.length:i;t=s.p_gpv(p.substring(0,i),u+'',h);if(t){t=t.indexOf('#"
+"')>-1?t.substring(0,t.indexOf('#')):t;}if(t)v+=v?d+t:t;p=p.substrin"
+"g(i==p.length?i:i+1)}return v");
s.p_gpv=new Function("k","u","h",""
+"var s=this,v='',q;j=h==1?'#':'?';i=u.indexOf(j);if(k&&i>-1){q=u.sub"
+"string(i+1);v=s.pt(q,'&','p_gvf',k)}return v");
s.p_gvf=new Function("t","k",""
+"if(t){var s=this,i=t.indexOf('='),p=i<0?t:t.substring(0,i),v=i<0?'T"
+"rue':t.substring(i+1);if(p.toLowerCase()==k.toLowerCase())return s."
+"epa(v)}return''"); */
/*
 *	Plug-in: crossVisitParticipation v1.7 - stacks values from
 *	specified variable in cookie and returns value
 */

s.crossVisitParticipation = new Function("v", "cn", "ex", "ct", "dl", "ev", "dv", "" 
+ "var s=this,ce;if(typeof(dv)==='undefined')dv=0;if(s.events&&ev){var" 
+ " ay=s.split(ev,',');var ea=s.split(s.events,',');for(var u=0;u<ay.l" 
+ "ength;u++){for(var x=0;x<ea.length;x++){if(ay[u]==ea[x]){ce=1;}}}}i" 
+ "f(!v||v==''){if(ce){s.c_w(cn,'');return'';}else return'';}v=escape(" 
+ "v);var arry=new Array(),a=new Array(),c=s.c_r(cn),g=0,h=new Array()" 
+ ";if(c&&c!=''){arry=s.split(c,'],[');for(q=0;q<arry.length;q++){z=ar" 
+ "ry[q];z=s.repl(z,'[','');z=s.repl(z,']','');z=s.repl(z,\"'\",'');arry" 
+ "[q]=s.split(z,',')}}var e=new Date();e.setFullYear(e.getFullYear()+" 
+ "5);if(dv==0&&arry.length>0&&arry[arry.length-1][0]==v)arry[arry.len" 
+ "gth-1]=[v,new Date().getTime()];else arry[arry.length]=[v,new Date(" 
+ ").getTime()];var start=arry.length-ct<0?0:arry.length-ct;var td=new" 
+ " Date();for(var x=start;x<arry.length;x++){var diff=Math.round((td." 
+ "getTime()-arry[x][1])/86400000);if(diff<ex){h[g]=unescape(arry[x][0" 
+ "]);a[g]=[arry[x][0],arry[x][1]];g++;}}var data=s.join(a,{delim:','," 
+ "front:'[',back:']',wrap:\"'\"});s.c_w(cn,data,e);var r=s.join(h,{deli" 
+ "m:dl});if(ce)s.c_w(cn,'');return r;");

s.join = new Function("v", "p", "" 
+ "var s = this;var f,b,d,w;if(p){f=p.front?p.front:'';b=p.back?p.back" 
+ ":'';d=p.delim?p.delim:'';w=p.wrap?p.wrap:'';}var str='';for(var x=0" 
+ ";x<v.length;x++){if(typeof(v[x])=='object' )str+=s.join( v[x],p);el" 
+ "se str+=w+v[x]+w;if(x<v.length-1)str+=d;}return f+str+b;");
s.split = new Function("l", "d", "" 
+ "var i,x=0,a=new Array;while(l){i=l.indexOf(d);i=i>-1?i:l.length;a[x" 
+ "++]=l.substring(0,i);l=l.substring(i+d.length);}return a");

/*
 * Plugin: getTimeParting 2.0
 */
s.getTimeParting = new Function("t", "z", "y", "l", "" 
+ "var s=this,d,A,U,X,Z,W,B,C,D,Y;d=new Date();A=d.getFullYear();Y=U=S" 
+ "tring(A);if(s.dstStart&&s.dstEnd){B=s.dstStart;C=s.dstEnd}else{;U=U" 
+ ".substring(2,4);X='090801|101407|111306|121104|131003|140902|150801" 
+ "|161306|171205|181104|191003';X=s.split(X,'|');for(W=0;W<=10;W++){Z" 
+ "=X[W].substring(0,2);if(U==Z){B=X[W].substring(2,4);C=X[W].substrin" 
+ "g(4,6)}}if(!B||!C){B='08';C='01'}B='03/'+B+'/'+A;C='11/'+C+'/'+A;}D" 
+ "=new Date('1/1/2000');if(D.getDay()!=6||D.getMonth()!=0){return'Dat" 
+ "a Not Available'}else{z=z?z:'0';z=parseFloat(z);B=new Date(B);C=new" 
+ " Date(C);W=new Date();if(W>B&&W<C&&l!='0'){z=z+1}W=W.getTime()+(W.g" 
+ "etTimezoneOffset()*60000);W=new Date(W+(3600000*z));X=['Sunday','Mo" 
+ "nday','Tuesday','Wednesday','Thursday','Friday','Saturday'];B=W.get" 
+ "Hours();C=W.getMinutes();D=W.getDay();Z=X[D];U='AM';A='Weekday';X='" 
+ "00';if(C>30){X='30'}if(B>=12){U='PM';B=B-12};if(B==0){B=12};if(D==6" 
+ "||D==0){A='Weekend'}W=B+':'+X+U;if(y&&y!=Y){return'Data Not Availab" 
+ "le'}else{if(t){if(t=='h'){return W}if(t=='d'){return Z}if(t=='w'){r" 
+ "eturn A}}else{return Z+', '+W}}}");

/*
 * Plugin: Form Analysis 2.1 (Success, Error, Abandonment)
 */
s.setupFormAnalysis = new Function("" 
+ "var s=this;if(!s.fa){s.fa=new Object;var f=s.fa;f.ol=s.wd.onload;s." 
+ "wd.onload=s.faol;f.uc=s.useCommerce;f.vu=s.varUsed;f.vl=f.uc?s.even" 
+ "tList:'';f.tfl=s.trackFormList;f.fl=s.formList;f.va=new Array('',''" 
+ ",'','')}");
s.sendFormEvent = new Function("t", "pn", "fn", "en", "" 
+ "var s=this,f=s.fa;t=t=='s'?t:'e';f.va[0]=pn;f.va[1]=fn;f.va[3]=t=='" 
+ "s'?'Success':en;s.fasl(t);f.va[1]='';f.va[3]='';");
s.faol = new Function("e", "" 
+ "var s=s_c_il[" + s._in + "],f=s.fa,r=true,fo,fn,i,en,t,tf;if(!e)e=s.wd." 
+ "event;f.os=new Array;if(f.ol)r=f.ol(e);if(s.d.forms&&s.d.forms.leng" 
+ "th>0){for(i=s.d.forms.length-1;i>=0;i--){fo=s.d.forms[i];fn=fo.name" 
+ ";tf=f.tfl&&s.pt(f.fl,',','ee',fn)||!f.tfl&&!s.pt(f.fl,',','ee',fn);" 
+ "if(tf){f.os[fn]=fo.onsubmit;fo.onsubmit=s.faos;f.va[1]=fn;f.va[3]='" 
+ "No Data Entered';for(en=0;en<fo.elements.length;en++){el=fo.element" 
+ "s[en];t=el.type;if(t&&t.toUpperCase){t=t.toUpperCase();var md=el.on" 
+ "mousedown,kd=el.onkeydown,omd=md?md.toString():'',okd=kd?kd.toStrin" 
+ "g():'';if(omd.indexOf('.fam(')<0&&okd.indexOf('.fam(')<0){el.s_famd" 
+ "=md;el.s_fakd=kd;el.onmousedown=s.fam;el.onkeydown=s.fam}}}}}f.ul=s" 
+ ".wd.onunload;s.wd.onunload=s.fasl;}return r;");
s.faos = new Function("e", "" 
+ "var s=s_c_il[" + s._in + "],f=s.fa,su;if(!e)e=s.wd.event;if(f.vu){s[f.v" 
+ "u]='';f.va[1]='';f.va[3]='';}su=f.os[this.name];return su?su(e):tru" 
+ "e;");
s.fasl = new Function("e", "" 
+ "var s=s_c_il[" + s._in + "],f=s.fa,a=f.va,l=s.wd.location,ip=s.trackPag" 
+ "eName,p=s.pageName;if(a[1]!=''&&a[3]!=''){a[0]=!p&&ip?l.host+l.path" 
+ "name:a[0]?a[0]:p;if(!f.uc&&a[3]!='No Data Entered'){if(e=='e')a[2]=" 
+ "'Error';else if(e=='s')a[2]='Success';else a[2]='Abandon'}else a[2]" 
+ "='';var tp=ip?a[0]+':':'',t3=e!='s'?':('+a[3]+')':'',ym=!f.uc&&a[3]" 
+ "!='No Data Entered'?tp+a[1]+':'+a[2]+t3:tp+a[1]+t3,ltv=s.linkTrackV" 
+ "ars,lte=s.linkTrackEvents,up=s.usePlugins;if(f.uc){s.linkTrackVars=" 
+ "ltv=='None'?f.vu+',events':ltv+',events,'+f.vu;s.linkTrackEvents=lt" 
+ "e=='None'?f.vl:lte+','+f.vl;f.cnt=-1;if(e=='e')s.events=s.pt(f.vl,'" 
+ ",','fage',2);else if(e=='s')s.events=s.pt(f.vl,',','fage',1);else s" 
+ ".events=s.pt(f.vl,',','fage',0)}else{s.linkTrackVars=ltv=='None'?f." 
+ "vu:ltv+','+f.vu}s[f.vu]=ym;s.usePlugins=false;var faLink=new Object" 
+ "();faLink.href='#';s.tl(faLink,'o','Form Analysis');s[f.vu]='';s.us" 
+ "ePlugins=up}return f.ul&&e!='e'&&e!='s'?f.ul(e):true;");
s.fam = new Function("e", "" 
+ "var s=s_c_il[" + s._in + "],f=s.fa;if(!e) e=s.wd.event;var o=s.trackLas" 
+ "tChanged,et=e.type.toUpperCase(),t=this.type.toUpperCase(),fn=this." 
+ "form.name,en=this.name,sc=false;if(document.layers){kp=e.which;b=e." 
+ "which}else{kp=e.keyCode;b=e.button}et=et=='MOUSEDOWN'?1:et=='KEYDOW" 
+ "N'?2:et;if(f.ce!=en||f.cf!=fn){if(et==1&&b!=2&&'BUTTONSUBMITRESETIM" 
+ "AGERADIOCHECKBOXSELECT-ONEFILE'.indexOf(t)>-1){f.va[1]=fn;f.va[3]=e" 
+ "n;sc=true}else if(et==1&&b==2&&'TEXTAREAPASSWORDFILE'.indexOf(t)>-1" 
+ "){f.va[1]=fn;f.va[3]=en;sc=true}else if(et==2&&kp!=9&&kp!=13){f.va[" 
+ "1]=fn;f.va[3]=en;sc=true}if(sc){nface=en;nfacf=fn}}if(et==1&&this.s" 
+ "_famd)return this.s_famd(e);if(et==2&&this.s_fakd)return this.s_fak" 
+ "d(e);");
s.ee = new Function("e", "n", "" 
+ "return n&&n.toLowerCase?e.toLowerCase()==n.toLowerCase():false;");
s.fage = new Function("e", "a", "" 
+ "var s=this,f=s.fa,x=f.cnt;x=x?x+1:1;f.cnt=x;return x==a?e:'';");
/*
 * Plugin: getNewRepeat 1.2 - Returns whether user is new or repeat
 */
s.getNewRepeat = new Function("d", "cn", "" 
+ "var s=this,e=new Date(),cval,sval,ct=e.getTime();d=d?d:30;cn=cn?cn:" 
+ "'s_nr';e.setTime(ct+d*24*60*60*1000);cval=s.c_r(cn);if(cval.length=" 
+ "=0){s.c_w(cn,ct+'-New',e);return'New';}sval=s.split(cval,'-');if(ct" 
+ "-sval[0]<30*60*1000&&sval[1]=='New'){s.c_w(cn,ct+'-New',e);return'N" 
+ "ew';}else{s.c_w(cn,ct+'-Repeat',e);return'Repeat';}");

/*
 * Plugin: Days since last Visit 1.0.H - capture time from last visit
 */
s.getDaysSinceLastVisit = new Function("" 
+ "var s=this,e=new Date(),cval,ct=e.getTime(),c='s_lastvisit',day=24*" 
+ "60*60*1000;e.setTime(ct+3*365*day);cval=s.c_r(c);if(!cval){s.c_w(c," 
+ "ct,e);return 'First page view or cookies not supported';}else{var d" 
+ "=ct-cval;if(d>30*60*1000){if(d>30*day){s.c_w(c,ct,e);return 'More t" 
+ "han 30 days';}if(d<30*day+1 && d>7*day){s.c_w(c,ct,e);return 'More " 
+ "than 7 days';}if(d<7*day+1 && d>day){s.c_w(c,ct,e);return 'Less tha" 
+ "n 7 days';}if(d<day+1){s.c_w(c,ct,e);return 'Less than 1 day';}}els" 
+ "e return '';}"
);
/*
   * Plugin: getVisitNum - version 3.0
   */
s.getVisitNum = new Function("tp", "c", "c2", "" 
+ "var s=this,e=new Date,cval,cvisit,ct=e.getTime(),d;if(!tp){tp='m';}" 
+ "if(tp=='m'||tp=='w'||tp=='d'){eo=s.endof(tp),y=eo.getTime();e.setTi" 
+ "me(y);}else {d=tp*86400000;e.setTime(ct+d);}if(!c){c='s_vnum';}if(!" 
+ "c2){c2='s_invisit';}cval=s.c_r(c);if(cval){var i=cval.indexOf('&vn=" 
+ "'),str=cval.substring(i+4,cval.length),k;}cvisit=s.c_r(c2);if(cvisi" 
+ "t){if(str){e.setTime(ct+1800000);s.c_w(c2,'true',e);return str;}els" 
+ "e {return 'unknown visit number';}}else {if(str){str++;k=cval.substri" 
+ "ng(0,i);e.setTime(k);s.c_w(c,k+'&vn='+str,e);e.setTime(ct+1800000);" 
+ "s.c_w(c2,'true',e);return str;}else {s.c_w(c,e.getTime()+'&vn=1',e)" 
+ ";e.setTime(ct+1800000);s.c_w(c2,'true',e);return 1;}}");
s.dimo = new Function("m", "y", "" 
+ "var d=new Date(y,m+1,0);return d.getDate();");
s.endof = new Function("x", "" 
+ "var t=new Date;t.setHours(0);t.setMinutes(0);t.setSeconds(0);if(x==" 
+ "'m'){d=s.dimo(t.getMonth(),t.getFullYear())-t.getDate()+1;}else if(" 
+ "x=='w'){d=7-t.getDay();}else {d=1;}t.setDate(t.getDate()+d);return " 
+ "t;");
/*
 * Plugin: getAndPersistValue 0.3 - get a value on every page
 */
s.getAndPersistValue = new Function("v", "c", "e", "" 
+ "var s=this,a=new Date;e=e?e:0;a.setTime(a.getTime()+e*86400000);if(" 
+ "v)s.c_w(c,v,e?a:0);return s.c_r(c);");
/*
 * Plugin: getTimeToComplete 0.4 - return the time from start to stop
 */
s.getTimeToComplete = new Function("v", "cn", "e", "" 
+ "var s=this,d=new Date,x=d,k;if(!s.ttcr){e=e?e:0;if(v=='start'||v=='" 
+ "stop')s.ttcr=1;x.setTime(x.getTime()+e*86400000);if(v=='start'){s.c" 
+ "_w(cn,d.getTime(),e?x:0);return '';}if(v=='stop'){k=s.c_r(cn);if(!s" 
+ ".c_w(cn,'',d)||!k)return '';v=(d.getTime()-k)/1000;var td=86400,th=" 
+ "3600,tm=60,r=5,u,un;if(v>td){u=td;un='days';}else if(v>th){u=th;un=" 
+ "'hours';}else if(v>tm){r=2;u=tm;un='minutes';}else{r=.2;u=1;un='sec" 
+ "onds';}v=v*r/u;return (Math.round(v)/r)+' '+un;}}return '';");
/*
 * Plugin: getVisitStart v2.0 - returns 1 on first page of visit
 * otherwise 0
 */
s.getVisitStart = new Function("c", "" 
+ "var s=this,v=1,t=new Date;t.setTime(t.getTime()+1800000);if(s.c_r(c" 
+ ")){v=0}if(!s.c_w(c,1,t)){s.c_w(c,1,0)}if(!s.c_r(c)){v=0}return v;");

/*
* Plugin: getPreviousValue_v1.0 - return previous value of designated
* variable (requires split utility)
*/
s.getPreviousValue = new Function("v", "c", "el", "" 
+ "var s=this,t=new Date,i,j,r='';t.setTime(t.getTime()+1800000);if(el" 
+ "){if(s.events){i=s.split(el,',');j=s.split(s.events,',');for(x in i" 
+ "){for(y in j){if(i[x]==j[y]){if(s.c_r(c)) r=s.c_r(c);v?s.c_w(c,v,t)" 
+ ":s.c_w(c,'no value',t);return r}}}}}else{if(s.c_r(c)) r=s.c_r(c);v?" 
+ "s.c_w(c,v,t):s.c_w(c,'no value',t);return r}");

/*
* Plugin: getPercentPageViewed v1.x
* This code has been modified from the original version distributed
* by Omniture and will not be supported by Omniture in any way
*/
s.getPercentPageViewed = new Function("", "" 
+ "var s=this;if(typeof(s.linkType)=='undefined'||s.linkType=='e'){var" 
+ " v=s.c_r('s_ppv');s.c_w('s_ppv',0);return v;}");
s.getPPVCalc = new Function("", "" 
+ "var dh=Math.max(Math.max(s.d.body.scrollHeight,s.d.documentElement." 
+ "scrollHeight),Math.max(s.d.body.offsetHeight,s.d.documentElement.of" 
+ "fsetHeight),Math.max(s.d.body.clientHeight,s.d.documentElement.clie" 
+ "ntHeight)),vph=s.d.clientHeight||Math.min(s.d.documentElement.clien" 
+ "tHeight,s.d.body.clientHeight),st=s.wd.pageYOffset||(s.wd.document." 
+ "documentElement.scrollTop||s.wd.document.body.scrollTop),vh=st+vph," 
+ "pv=Math.round(vh/dh*100),cv=s.c_r('s_ppv'),cpi=cv.indexOf('|'),cpv=" 
+ "'',ps='';if(cpi!=-1){cpv=cv.substring(0,cpi);ps=parseInt(cv.substri" 
+ "ng(cpi+1));}else{cpv=ps=0;}if(pv<=100){if(pv>parseInt(cpv)){ps=pv-M" 
+ "ath.round(vph/dh*100);s.c_w('s_ppv',pv+'|'+ps);}}else{s.c_w('s_ppv'" 
+ ",'');}");
s.getPPVSetup = new Function("", "" 
+ "var s=this;if(s.wd.addEventListener){s.wd.addEventListener('load',s" 
+ ".getPPVCalc,false);s.wd.addEventListener('scroll',s.getPPVCalc,fals" 
+ "e);s.wd.addEventListener('resize',s.getPPVCalc,false);}else if(s.wd" 
+ ".attachEvent){s.wd.attachEvent('onload',s.getPPVCalc);s.wd.attachEv" 
+ "ent('onscroll',s.getPPVCalc);s.wd.attachEvent('onresize',s.getPPVCa" 
+ "lc);}");
s.getPPVSetup();

/************************** ATLAS VARIABLES **************************/
/* @TODO: Fill in these variables with the settings mapped in the
 * ATLAS wizard and that match your desired preferences. 
 * @TODO: Comments should be removed in a production deployment. */
var adservConfig = {
    tEvar: 'eVar54', // Transfer variable, typically the "View Through" eVar.
    PartnerTag: 'swialo_AdobeGenesisSW_1', // Partner Tag 
    gID: 'ATL:', // Genesis ID
    requestURL: "http://view.atdmt.com/partner/OMTR?ID=[PartnerTag]&var=[VAR]", // the Atlas request URL
    maxDelay: "750", // The maximum time to wait for ATLAS servers to respond, in milliseconds.
    visitCookie: "s_atlas", // The name of the visitor cookie to use to restrict ATLAS calls to once per visit.
    clickThroughParam: "CID", // A query string paramter that will force the ATLAS call to occur.
    searchCenterParam: undefined // SearchCenter identifier.
};
/************************ END ATLAS Variables ************************/

/*
 * Partner Plugin: Atlas Check 1.0 
 */

s.maxDelay = adservConfig.maxDelay;
s.loadModule("Integrate")
s.Integrate.onLoad = function(s, m) {
    var adservCheck = s.partnerADSERVCheck(adservConfig);
    if (adservCheck) {
        s.Integrate.add("Atlas_DMT");
        s.Integrate.Atlas_DMT.PartnerTag = adservConfig.PartnerTag;
        s.Integrate.Atlas_DMT.gID = adservConfig.gID;
        s.Integrate.Atlas_DMT.tVar = adservConfig.tEvar;
        s.Integrate.Atlas_DMT.get(adservConfig.requestURL);
        
        s.Integrate.Atlas_DMT.setVars = function(s, p) {
            var 
            at = p.lastImpTime, 
            a1 = p.lastImpSId, 
            a2 = p.lastImpPId, 
            a3 = p.lastImpAId, 
            bt = p.lastClkTime, 
            b1 = p.lastClkSId, 
            b2 = p.lastClkPId, 
            b3 = p.lastClkAId;
            
            if (((at && a1 && a2 && a3) || (bt && b1 && b2 && b3)) && !p.errorCode)
                s[p.tVar] = adservConfig.gID + (at ? at : 0) + ":" + (a1 ? a1 : 0) + ":" + (a2 ? a2 : 0) + ":" + (a3 ? a3 : 0) + ":" + (bt ? bt : 0) + ":" + (b1 ? b1 : 0) + ":" + (b2 ? b2 : 0) + ":" + (b3 ? b3 : 0)
        }
    }
}

/*
 * Partner Plugin: ADSERV Check 1.0 - Restrict ADSERV calls to once a visit, per report suite, per click
 * through. Used in conjunction with genesis_event_config table. Deduplicates SCM hits.
 */
s.partnerADSERVCheck = new Function("cfg", "" 
+ "var s=this,c=cfg.visitCookie,src=cfg.clickThroughParam,scp=cfg.searchCenterParam,tv=cfg.tEvar,dl=',',cr,nc,q,g,gs,i,j,k,fnd,v=1," 
+ "t=new Date,cn=0,ca=new Array,aa=new Array,cs=new Array;t.setTime(t.getTime()+1800000);cr=s.c_r(c);if(cr){v=0;}ca=s.split(cr,dl);" 
+ "aa=s.split(s.un,dl);for(i=0;i<aa.length;i++){fnd = 0;for(j=0;j<ca.length;j++){if(aa[i] == ca[j]){fnd=1;}}if(!fnd){cs[cn]=aa[i];c" 
+ "n++;}}if(cs.length){for(k=0;k<cs.length;k++){nc=(nc?nc+dl:'')+cs[k];}cr=(cr?cr+dl:'')+nc;v=1;}q=s.wd.location.search.toLowerCase(" 
+ ");q=s.repl(q,'?','&');g=q.indexOf('&'+src.toLowerCase()+'=');gs=(scp)?q.indexOf('&'+scp.toLowerCase()+'='):-1;if(g>-1){v=1;}else i" 
+ "f(gs>-1){v=0;s.vpr(tv,'SearchCenter Visitors');}if(!s.c_w(c,cr,t)){s.c_w(c,cr,0);}if(!s.c_r(c)){v=0;}return v>=1;");

/********************************************************************
 *
 * Supporting functions that may be shared between plug-ins
 *
 *******************************************************************/

/*
 * Utility Function: vpr - set the variable vs with value v
 */
s.vpr = new Function("vs", "v", 
"if(typeof(v)!='undefined'){var s=this; eval('s.'+vs+'=\"'+v+'\"')}");

/*
 * Utility Function: split v1.5 - split a string (JS 1.0 compatible)
 */
s.split = new Function("l", "d", "" 
+ "var i,x=0,a=new Array;while(l){i=l.indexOf(d);i=i>-1?i:l.length;a[x++]=l.substring(0,i);l=l.substring(i+d.length);}return a");

/*
 * Plugin Utility: Replace v1.0
 */
s.repl = new Function("x", "o", "n", "" 
+ "var i=x.indexOf(o),l=n.length;while(x&&i>=0){x=x.substring(0,i)+n+x.substring(i+o.length);i=x.indexOf(o,i+l)}return x");


/* Module: Integrate */
s.m_Integrate_c = "var m=s.m_i('Integrate');m.add=function(n,o){var m=this,p;if(!o)o='s_Integrate_'+n;if(!m.s.wd[o])m.s.wd[o]=new Object;m[n]=new Object;p=m[n];p._n=n;p._m=m;p._c=0;p._d=0;p.disable=0;p" 
+ ".get=m.get;p.delay=m.delay;p.ready=m.ready;p.beacon=m.beacon;p.script=m.script;m.l[m.l.length]=n};m._g=function(t){var m=this,s=m.s,i,p,f=(t?'use':'set')+'Vars',tcf;for(i=0;i<m.l.length;i++){p=m[m." 
+ "l[i]];if(p&&!p.disable&&p[f]){if(s.apv>=5&&(!s.isopera||s.apv>=7)){tcf=new Function('s','p','f','var e;try{p[f](s,p)}catch(e){}');tcf(s,p,f)}else p[f](s,p)}}};m._t=function(){this._g(1)};m._fu=func" 
+ "tion(p,u){var m=this,s=m.s,v,x,y,z,tm=new Date;if(u.toLowerCase().substring(0,4) != 'http')u='http://'+u;if(s.ssl)u=s.rep(u,'http:','https:');p.RAND=Math&&Math.random?Math.floor(Math.random()*10000" 
+ "000000000):tm.getTime();p.RAND+=Math.floor(tm.getTime()/10800000)%10;x=0;while(x>=0){x=u.indexOf('[',x);if(x>=0){y=u.indexOf(']',x);if(y>x){z=u.substring(x+1,y);if(z.length>2&&z.substring(0,2)=='s." 
+ "'){v=s[z.substring(2)];if(!v)v=''}else{v=''+p[z];if(!(v==p[z]||parseFloat(v)==p[z]))z=0}if(z) {u=u.substring(0,x)+s.rep(escape(v),'+','%2B')+u.substring(y+1);x=y-(z.length-v.length+1)} else {x=y}}}" 
+ "}return u};m.get=function(u,v){var p=this,m=p._m;if(!p.disable){if(!v)v='s_'+m._in+'_Integrate_'+p._n+'_get_'+p._c;p._c++;p.VAR=v;p._d++;m.s.loadModule('Integrate:'+v,m._fu(p,u),0,1,p._n)}};m.delay" 
+ "=function(){var p=this;if(p._d<=0)p._d=1};m.ready=function(){var p=this,m=p._m;p._d=0;if(!p.disable)m.s.dlt()};m._d=function(){var m=this,i,p;for(i=0;i<m.l.length;i++){p=m[m.l[i]];if(p&&!p.disable&" 
+ "&p._d>0)return 1}return 0};m._x=function(d,n){var p=this[n],x;if(!p.disable){for(x in d)if(x&&(!Object||!Object.prototype||!Object.prototype[x]))p[x]=d[x];p._d--}};m.beacon=function(u){var p=this,m" 
+ "=p._m,s=m.s,imn='s_i_'+m._in+'_Integrate_'+p._n+'_'+p._c,im;if(!p.disable&&s.d.images&&s.apv>=3&&(!s.isopera||s.apv>=7)&&(s.ns6<0||s.apv>=6.1)){p._c++;im=s.wd[imn]=new Image;im.src=m._fu(p,u)}};m.s" 
+ "cript=function(u){var p=this,m=p._m;if(!p.disable)m.s.loadModule(0,m._fu(p,u),0,1)};m.l=new Array;if(m.onLoad)m.onLoad(s,m)";
s.m_i("Integrate");


/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
s.visitorNamespace = "starwoodhotels"
s.trackingServer = "metrics.starwoodhotels.com"
s.trackingServerSecure = "smetrics.starwoodhotels.com"
s.dc = 112
/****************************** MEDIA MODULE - PLEASE DO NOT ALTER! *****************************/
/* Module: Media */
s.m_Media_c = "var m=s.m_i('Media');if(m.completeByCloseOffset==undefined)m.completeByCloseOffset=1;if(m.completeCloseOffsetThreshold==undefined)m.completeCloseOffsetThreshold=1;m.cn=function(n){var m=" 
+ "this;return m.s.rep(m.s.rep(m.s.rep(n,\"\\n\",''),\"\\r\",''),'--**--','')};m.open=function(n,l,p,b){var m=this,i=new Object,tm=new Date,a='',x;n=m.cn(n);if(!l)l=-1;if(n&&p){if(!m.l)m.l=new Object;" 
+ "if(m.l[n])m.close(n);if(b&&b.id)a=b.id;if(a)for (x in m.l)if(m.l[x]&&m.l[x].a==a)m.close(m.l[x].n);i.n=n;i.l=l;i.o=0;i.x=0;i.p=m.cn(m.playerName?m.playerName:p);i.a=a;i.t=0;i.ts=0;i.s=Math.floor(tm" 
+ ".getTime()/1000);i.lx=0;i.lt=i.s;i.lo=0;i.e='';i.to=-1;i.tc=0;i.fel=new Object;i.vt=0;i.sn=0;i.sx=\"\";i.sl=0;i.sg=0;i.sc=0;i.us=0;i.ad=0;i.adpn;i.adpp;i.adppp;i.clk;i.CPM;i.co=0;i.cot=0;i.lm=0;i.l" 
+ "om=0;m.l[n]=i}};m.openAd=function(n,l,p,pn,pp,ppp,CPM,b){var m=this,i=new Object;n=m.cn(n);m.open(n,l,p,b);i=m.l[n];if(i){i.ad=1;i.adpn=m.cn(pn);i.adpp=pp;i.adppp=ppp;i.CPM=CPM}};m._delete=function" 
+ "(n){var m=this,i;n=m.cn(n);i=m.l[n];m.l[n]=0;if(i&&i.m)clearTimeout(i.m.i)};m.close=function(n){this.e(n,0,-1)};m.play=function(n,o,sn,sx,sl){var m=this,i;i=m.e(n,1,o,sn,sx,sl);if(i&&!i.m){i.m=new " 
+ "Object;i.m.m=new Function('var m=s_c_il['+m._in+'],i;if(m.l){i=m.l[\"'+m.s.rep(i.n,'\"','\\\\\"')+'\"];if(i){if(i.lx==1)m.e(i.n,3,-1);i.m.i=setTimeout(i.m.m,1000)}}');i.m.m()}};m.click=function(n,o" 
+ "){this.e(n,7,o)};m.complete=function(n,o){this.e(n,5,o)};m.stop=function(n,o){this.e(n,2,o)};m.track=function(n){this.e(n,4,-1)};m.bcd=function(vo,i){var m=this,ns='a.media.',v=vo.linkTrackVars,e=v" 
+ "o.linkTrackEvents,pe='m_i',pev3,c=vo.contextData,x;if(i.ad){ns+='ad.';if(i.adpn){c['a.media.name']=i.adpn;c[ns+'pod']=i.adpp;c[ns+'podPosition']=i.adppp;}if(!i.vt)c[ns+'CPM']=i.CPM;}if (i.clk) {c[n" 
+ "s+'clicked']=true;i.clk=0}c['a.contentType']='video'+(i.ad?'Ad':'');c['a.media.channel']=m.channel;c[ns+'name']=i.n;c[ns+'playerName']=i.p;if(i.l>0)c[ns+'length']=i.l;if(Math.floor(i.ts)>0)c[ns+'ti" 
+ "mePlayed']=Math.floor(i.ts);if(!i.vt){c[ns+'view']=true;pe='m_s';i.vt=1}if(i.sx){c[ns+'segmentNum']=i.sn;c[ns+'segment']=i.sx;if(i.sl>0)c[ns+'segmentLength']=i.sl;if(i.sc&&i.ts>0)c[ns+'segmentView'" 
+ "]=true}if(!i.cot&&i.co){c[ns+\"complete\"]=true;i.cot=1}if(i.lm>0)c[ns+'milestone']=i.lm;if(i.lom>0)c[ns+'offsetMilestone']=i.lom;if(v)for(x in c)v+=',contextData.'+x;pev3=c['a.contentType'];vo.pe=" 
+ "pe;vo.pev3=pev3;var d=m.contextDataMapping,y,a,l,n;if(d){vo.events2='';if(v)v+=',events';for(x in d){if(x.substring(0,ns.length)==ns)y=x.substring(ns.length);else y=\"\";a=d[x];if(typeof(a)=='strin" 
+ "g'){l=m.s.sp(a,',');for(n=0;n<l.length;n++){a=l[n];if(x==\"a.contentType\"){if(v)v+=','+a;vo[a]=c[x]}else if(y=='view'||y=='segmentView'||y=='clicked'||y=='complete'||y=='timePlayed'||y=='CPM'){if(" 
+ "e)e+=','+a;if(y=='timePlayed'||y=='CPM'){if(c[x])vo.events2+=(vo.events2?',':'')+a+'='+c[x];}else if(c[x])vo.events2+=(vo.events2?',':'')+a}else if(y=='segment'&&c[x+'Num']){if(v)v+=','+a;vo[a]=c[x" 
+ "+'Num']+':'+c[x]}else{if(v)v+=','+a;vo[a]=c[x]}}}else if(y=='milestones'||y=='offsetMilestones'){x=x.substring(0,x.length-1);if(c[x]&&d[x+'s'][c[x]]){if(e)e+=','+d[x+'s'][c[x]];vo.events2+=(vo.even" 
+ "ts2?',':'')+d[x+'s'][c[x]]}}if(c[x])c[x]=undefined;if(y=='segment'&&c[x+'Num'])c[x+\"Num\"]=undefined}}vo.linkTrackVars=v;vo.linkTrackEvents=e};m.bpe=function(vo,i,x,o){var m=this,pe='m_o',pev3,d='" 
+ "--**--';pe='m_o';if(!i.vt){pe='m_s';i.vt=1}else if(x==4)pe='m_i';pev3=m.s.ape(i.n)+d+Math.floor(i.l>0?i.l:1)+d+m.s.ape(i.p)+d+Math.floor(i.t)+d+i.s+d+(i.to>=0?'L'+Math.floor(i.to):'')+i.e+(x!=0&&x!" 
+ "=2?'L'+Math.floor(o):'');vo.pe=pe;vo.pev3=pev3};m.e=function(n,x,o,sn,sx,sl,pd){var m=this,i,tm=new Date,ts=Math.floor(tm.getTime()/1000),c,l,v=m.trackVars,e=m.trackEvents,ti=m.trackSeconds,tp=m.tr" 
+ "ackMilestones,to=m.trackOffsetMilestones,sm=m.segmentByMilestones,so=m.segmentByOffsetMilestones,z=new Array,j,t=1,w=new Object,x,ek,tc,vo=new Object;if(!m.channel)m.channel=m.s.wd.location.hostnam" 
+ "e;n=m.cn(n);i=n&&m.l&&m.l[n]?m.l[n]:0;if(i){if(i.ad){ti=m.adTrackSeconds;tp=m.adTrackMilestones;to=m.adTrackOffsetMilestones;sm=m.adSegmentByMilestones;so=m.adSegmentByOffsetMilestones}if(o<0){if(i" 
+ ".lx==1&&i.lt>0)o=(ts-i.lt)+i.lo;else o=i.lo}if(i.l>0)o=o<i.l?o:i.l;if(o<0)o=0;i.o=o;if(i.l>0){i.x=(i.o/i.l)*100;i.x=i.x>100?100:i.x}if(i.lo<0)i.lo=o;tc=i.tc;w.name=n;w.ad=i.ad;w.length=i.l;w.openTi" 
+ "me=new Date;w.openTime.setTime(i.s*1000);w.offset=i.o;w.percent=i.x;w.playerName=i.p;if(i.to<0)w.mediaEvent=w.event='OPEN';else w.mediaEvent=w.event=(x==1?'PLAY':(x==2?'STOP':(x==3?'MONITOR':(x==4?" 
+ "'TRACK':(x==5?'COMPLETE':(x==7?'CLICK':('CLOSE')))))));if(!pd){if(i.pd)pd=i.pd}else i.pd=pd;w.player=pd;if(x>2||(x!=i.lx&&(x!=2||i.lx==1))) {if(!sx){sn=i.sn;sx=i.sx;sl=i.sl}if(x){if(x==1)i.lo=o;if(" 
+ "(x<=3||x>=5)&&i.to>=0){t=0;v=e=\"None\";if(i.to!=o){l=i.to;if(l>o){l=i.lo;if(l>o)l=o}z=tp?m.s.sp(tp,','):0;if(i.l>0&&z&&o>=l)for(j=0;j<z.length;j++){c=z[j]?parseFloat(''+z[j]):0;if(c&&(l/i.l)*100<c" 
+ "&&i.x>=c){t=1;j=z.length;w.mediaEvent=w.event='MILESTONE';i.lm=w.milestone=c}}z=to?m.s.sp(to,','):0;if(z&&o>=l)for(j=0;j<z.length;j++){c=z[j]?parseFloat(''+z[j]):0;if(c&&l<c&&o>=c){t=1;j=z.length;w" 
+ ".mediaEvent=w.event='OFFSET_MILESTONE';i.lom=w.offsetMilestone=c}}}}if(i.sg||!sx){if(sm&&tp&&i.l>0){z=m.s.sp(tp,',');if(z){z[z.length]='100';l=0;for(j=0;j<z.length;j++){c=z[j]?parseFloat(''+z[j]):0" 
+ ";if(c){if(i.x<c){sn=j+1;sx='M:'+l+'-'+c;j=z.length}l=c}}}}else if(so&&to){z=m.s.sp(to,',');if(z){z[z.length]=''+(i.l>0?i.l:'E');l=0;for(j=0;j<z.length;j++){c=z[j]?parseFloat(''+z[j]):0;if(c||z[j]==" 
+ "'E'){if(o<c||z[j]=='E'){sn=j+1;sx='O:'+l+'-'+c;j=z.length}l=c}}}}if(sx)i.sg=1}if((sx||i.sx)&&sx!=i.sx){i.us=1;if(!i.sx){i.sn=sn;i.sx=sx}if(i.to>=0)t=1}if((x>=2||i.x>=100)&&i.lo<o){i.t+=o-i.lo;i.ts+" 
+ "=o-i.lo}if(x<=2||(x==3&&!i.lx)){i.e+=(x==1||x==3?'S':'E')+Math.floor(o);i.lx=(x==3?1:x)}if(!t&&i.to>=0&&x<=3){ti=ti?ti:0;if(ti&&i.ts>=ti){t=1;w.mediaEvent=w.event='SECONDS'}}i.lt=ts;i.lo=o}if(!x||(" 
+ "x<=3&&i.x>=100)){if(i.lx!=2)i.e+='E'+Math.floor(o);x=0;v=e=\"None\";w.mediaEvent=w.event=\"CLOSE\"}if(x==7){w.clicked=i.clk=1;t=1}if(x==5||(m.completeByCloseOffset&&(!x||i.x>=100)&&i.l>0&&o>=i.l-m." 
+ "completeCloseOffsetThreshold)){w.complete=i.co=1;t=1}ek=w.mediaEvent;if(ek=='MILESTONE')ek+='_'+w.milestone;else if(ek=='OFFSET_MILESTONE')ek+='_'+w.offsetMilestone;if(!i.fel[ek]) {w.eventFirstTime" 
+ "=true;i.fel[ek]=1}else w.eventFirstTime=false;w.timePlayed=i.t;w.segmentNum=i.sn;w.segment=i.sx;w.segmentLength=i.sl;if(m.monitor&&x!=4)m.monitor(m.s,w);if(x==0)m._delete(n);if(t&&i.tc==tc){vo=new " 
+ "Object;vo.contextData=new Object;vo.linkTrackVars=v;vo.linkTrackEvents=e;if(!vo.linkTrackVars)vo.linkTrackVars='';if(!vo.linkTrackEvents)vo.linkTrackEvents='';if(m.trackUsingContextData)m.bcd(vo,i)" 
+ ";else m.bpe(vo,i,x,o);m.s.t(vo);if(i.us){i.sn=sn;i.sx=sx;i.sc=1;i.us=0}else if(i.ts>0)i.sc=0;i.e=\"\";i.lm=i.lom=0;i.ts-=Math.floor(i.ts);i.to=o;i.tc++}}}return i};m.ae=function(n,l,p,x,o,sn,sx,sl," 
+ "pd,b){var m=this,r=0;if(n&&(!m.autoTrackMediaLengthRequired||(length&&length>0)) &&p){if(!m.l||!m.l[n]){if(x==1||x==3){m.open(n,l,p,b);r=1}}else r=1;if(r)m.e(n,x,o,sn,sx,sl,pd)}};m.a=function(o,t){" 
+ "var m=this,i=o.id?o.id:o.name,n=o.name,p=0,v,c,c1,c2,xc=m.s.h,x,e,f1,f2='s_media_'+m._in+'_oc',f3='s_media_'+m._in+'_t',f4='s_media_'+m._in+'_s',f5='s_media_'+m._in+'_l',f6='s_media_'+m._in+'_m',f7" 
+ "='s_media_'+m._in+'_c',tcf,w;if(!i){if(!m.c)m.c=0;i='s_media_'+m._in+'_'+m.c;m.c++}if(!o.id)o.id=i;if(!o.name)o.name=n=i;if(!m.ol)m.ol=new Object;if(m.ol[i])return;m.ol[i]=o;if(!xc)xc=m.s.b;tcf=new" 
+ " Function('o','var e,p=0;try{if(o.versionInfo&&o.currentMedia&&o.controls)p=1}catch(e){p=0}return p');p=tcf(o);if(!p){tcf=new Function('o','var e,p=0,t;try{t=o.GetQuickTimeVersion();if(t)p=2}catch(" 
+ "e){p=0}return p');p=tcf(o);if(!p){tcf=new Function('o','var e,p=0,t;try{t=o.GetVersionInfo();if(t)p=3}catch(e){p=0}return p');p=tcf(o)}}v=\"var m=s_c_il[\"+m._in+\"],o=m.ol['\"+i+\"']\";if(p==1){p=" 
+ "'Windows Media Player '+o.versionInfo;c1=v+',n,p,l,x=-1,cm,c,mn;if(o){cm=o.currentMedia;c=o.controls;if(cm&&c){mn=cm.name?cm.name:c.URL;l=cm.duration;p=c.currentPosition;n=o.playState;if(n){if(n==8" 
+ ")x=0;if(n==3)x=1;if(n==1||n==2||n==4||n==5||n==6)x=2;}';c2='if(x>=0)m.ae(mn,l,\"'+p+'\",x,x!=2?p:-1,0,\"\",0,0,o)}}';c=c1+c2;if(m.s.isie&&xc){x=m.s.d.createElement('script');x.language='jscript';x." 
+ "type='text/javascript';x.htmlFor=i;x.event='PlayStateChange(NewState)';x.defer=true;x.text=c;xc.appendChild(x);o[f6]=new Function(c1+'if(n==3){x=3;'+c2+'}setTimeout(o.'+f6+',5000)');o[f6]()}}if(p==" 
+ "2){p='QuickTime Player '+(o.GetIsQuickTimeRegistered()?'Pro ':'')+o.GetQuickTimeVersion();f1=f2;c=v+',n,x,t,l,p,p2,mn;if(o){mn=o.GetMovieName()?o.GetMovieName():o.GetURL();n=o.GetRate();t=o.GetTime" 
+ "Scale();l=o.GetDuration()/t;p=o.GetTime()/t;p2=o.'+f5+';if(n!=o.'+f4+'||p<p2||p-p2>5){x=2;if(n!=0)x=1;else if(p>=l)x=0;if(p<p2||p-p2>5)m.ae(mn,l,\"'+p+'\",2,p2,0,\"\",0,0,o);m.ae(mn,l,\"'+p+'\",x,x" 
+ "!=2?p:-1,0,\"\",0,0,o)}if(n>0&&o.'+f7+'>=10){m.ae(mn,l,\"'+p+'\",3,p,0,\"\",0,0,o);o.'+f7+'=0}o.'+f7+'++;o.'+f4+'=n;o.'+f5+'=p;setTimeout(\"'+v+';o.'+f2+'(0,0)\",500)}';o[f1]=new Function('a','b',c" 
+ ");o[f4]=-1;o[f7]=0;o[f1](0,0)}if(p==3){p='RealPlayer '+o.GetVersionInfo();f1=n+'_OnPlayStateChange';c1=v+',n,x=-1,l,p,mn;if(o){mn=o.GetTitle()?o.GetTitle():o.GetSource();n=o.GetPlayState();l=o.GetL" 
+ "ength()/1000;p=o.GetPosition()/1000;if(n!=o.'+f4+'){if(n==3)x=1;if(n==0||n==2||n==4||n==5)x=2;if(n==0&&(p>=l||p==0))x=0;if(x>=0)m.ae(mn,l,\"'+p+'\",x,x!=2?p:-1,0,\"\",0,0,o)}if(n==3&&(o.'+f7+'>=10|" 
+ "|!o.'+f3+')){m.ae(mn,l,\"'+p+'\",3,p,0,\"\",0,0,o);o.'+f7+'=0}o.'+f7+'++;o.'+f4+'=n;';c2='if(o.'+f2+')o.'+f2+'(o,n)}';if(m.s.wd[f1])o[f2]=m.s.wd[f1];m.s.wd[f1]=new Function('a','b',c1+c2);o[f1]=new" 
+ " Function('a','b',c1+'setTimeout(\"'+v+';o.'+f1+'(0,0)\",o.'+f3+'?500:5000);'+c2);o[f4]=-1;if(m.s.isie)o[f3]=1;o[f7]=0;o[f1](0,0)}};m.as=new Function('e','var m=s_c_il['+m._in+'],l,n;if(m.autoTrack" 
+ "&&m.s.d.getElementsByTagName){l=m.s.d.getElementsByTagName(m.s.isie?\"OBJECT\":\"EMBED\");if(l)for(n=0;n<l.length;n++)m.a(l[n]);}');if(s.wd.attachEvent)s.wd.attachEvent('onload',m.as);else if(s.wd." 
+ "addEventListener)s.wd.addEventListener('load',m.as,false);if(m.onLoad)m.onLoad(s,m)";
s.m_i("Media");

/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
var s_code = '', s_objectID;
function s_gi(un, pg, ss) {
    var c = "s.version='H.24.1';s.an=s_an;s.logDebug=function(m){var s=this,tcf=new Function('var e;try{console.log(\"'+s.rep(s.rep(m,\"\\n\",\"\\\\n\"),\"" 
    + "\\\"\",\"\\\\\\\"\")+'\");}catch(e){}');tcf()};s.cls=function(x,c){var i,y='';if(!c)c=this.an;for(i=0;i<x.length;i++){n=x.substring(i,i+1);if(c.indexOf(n)>=0)y+=n}return y};s.fl=function(x,l){retur" 
    + "n x?(''+x).substring(0,l):x};s.co=function(o){if(!o)return o;var n=new Object,x;for(x in o)if(x.indexOf('select')<0&&x.indexOf('filter')<0)n[x]=o[x];return n};s.num=function(x){x=''+x;for(var p=0;p" 
    + "<x.length;p++)if(('0123456789').indexOf(x.substring(p,p+1))<0)return 0;return 1};s.rep=s_rep;s.sp=s_sp;s.jn=s_jn;s.ape=function(x){var s=this,h='0123456789ABCDEF',i,c=s.charSet,n,l,e,y='';c=c?c.toU" 
    + "pperCase():'';if(x){x=''+x;if(s.em==3)x=encodeURIComponent(x);else if(c=='AUTO'&&('').charCodeAt){for(i=0;i<x.length;i++){c=x.substring(i,i+1);n=x.charCodeAt(i);if(n>127){l=0;e='';while(n||l<4){e=h" 
    + ".substring(n%16,n%16+1)+e;n=(n-n%16)/16;l++}y+='%u'+e}else if(c=='+')y+='%2B';else y+=escape(c)}x=y}else x=escape(''+x);x=s.rep(x,'+','%2B');if(c&&c!='AUTO'&&s.em==1&&x.indexOf('%u')<0&&x.indexOf('" 
    + "%U')<0){i=x.indexOf('%');while(i>=0){i++;if(h.substring(8).indexOf(x.substring(i,i+1).toUpperCase())>=0)return x.substring(0,i)+'u00'+x.substring(i);i=x.indexOf('%',i)}}}return x};s.epa=function(x)" 
    + "{var s=this;if(x){x=s.rep(''+x,'+',' ');return s.em==3?decodeURIComponent(x):unescape(x)}return x};s.pt=function(x,d,f,a){var s=this,t=x,z=0,y,r;while(t){y=t.indexOf(d);y=y<0?t.length:y;t=t.substri" 
    + "ng(0,y);r=s[f](t,a);if(r)return r;z+=y+d.length;t=x.substring(z,x.length);t=z<x.length?t:''}return ''};s.isf=function(t,a){var c=a.indexOf(':');if(c>=0)a=a.substring(0,c);c=a.indexOf('=');if(c>=0)a" 
    + "=a.substring(0,c);if(t.substring(0,2)=='s_')t=t.substring(2);return (t!=''&&t==a)};s.fsf=function(t,a){var s=this;if(s.pt(a,',','isf',t))s.fsg+=(s.fsg!=''?',':'')+t;return 0};s.fs=function(x,f){var" 
    + " s=this;s.fsg='';s.pt(x,',','fsf',f);return s.fsg};s.si=function(){var s=this,i,k,v,c=s_gi+'var s=s_gi(\"'+s.oun+'\");s.sa(\"'+s.un+'\");';for(i=0;i<s.va_g.length;i++){k=s.va_g[i];v=s[k];if(v!=unde" 
    + "fined){if(typeof(v)!='number')c+='s.'+k+'=\"'+s_fe(v)+'\";';else c+='s.'+k+'='+v+';'}}c+=\"s.lnk=s.eo=s.linkName=s.linkType=s.wd.s_objectID=s.ppu=s.pe=s.pev1=s.pev2=s.pev3='';\";return c};s.c_d='';" 
    + "s.c_gdf=function(t,a){var s=this;if(!s.num(t))return 1;return 0};s.c_gd=function(){var s=this,d=s.wd.location.hostname,n=s.fpCookieDomainPeriods,p;if(!n)n=s.cookieDomainPeriods;if(d&&!s.c_d){n=n?pa" 
    + "rseInt(n):2;n=n>2?n:2;p=d.lastIndexOf('.');if(p>=0){while(p>=0&&n>1){p=d.lastIndexOf('.',p-1);n--}s.c_d=p>0&&s.pt(d,'.','c_gdf',0)?d.substring(p):d}}return s.c_d};s.c_r=function(k){var s=this;k=s.a" 
    + "pe(k);var c=' '+s.d.cookie,i=c.indexOf(' '+k+'='),e=i<0?i:c.indexOf(';',i),v=i<0?'':s.epa(c.substring(i+2+k.length,e<0?c.length:e));return v!='[[B]]'?v:''};s.c_w=function(k,v,e){var s=this,d=s.c_gd" 
    + "(),l=s.cookieLifetime,t;v=''+v;l=l?(''+l).toUpperCase():'';if(e&&l!='SESSION'&&l!='NONE'){t=(v!=''?parseInt(l?l:0):-60);if(t){e=new Date;e.setTime(e.getTime()+(t*1000))}}if(k&&l!='NONE'){s.d.cookie" 
    + "=k+'='+s.ape(v!=''?v:'[[B]]')+'; path=/;'+(e&&l!='SESSION'?' expires='+e.toGMTString()+';':'')+(d?' domain='+d+';':'');return s.c_r(k)==v}return 0};s.eh=function(o,e,r,f){var s=this,b='s_'+e+'_'+s." 
    + "_in,n=-1,l,i,x;if(!s.ehl)s.ehl=new Array;l=s.ehl;for(i=0;i<l.length&&n<0;i++){if(l[i].o==o&&l[i].e==e)n=i}if(n<0){n=i;l[n]=new Object}x=l[n];x.o=o;x.e=e;f=r?x.b:f;if(r||f){x.b=r?0:o[e];x.o[e]=f}if(" 
    + "x.b){x.o[b]=x.b;return b}return 0};s.cet=function(f,a,t,o,b){var s=this,r,tcf;if(s.apv>=5&&(!s.isopera||s.apv>=7)){tcf=new Function('s','f','a','t','var e,r;try{r=s[f](a)}catch(e){r=s[t](e)}return " 
    + "r');r=tcf(s,f,a,t)}else{if(s.ismac&&s.u.indexOf('MSIE 4')>=0)r=s[b](a);else{s.eh(s.wd,'onerror',0,o);r=s[f](a);s.eh(s.wd,'onerror',1)}}return r};s.gtfset=function(e){var s=this;return s.tfs};s.gtfs" 
    + "oe=new Function('e','var s=s_c_il['+s._in+'],c;s.eh(window,\"onerror\",1);s.etfs=1;c=s.t();if(c)s.d.write(c);s.etfs=0;return true');s.gtfsfb=function(a){return window};s.gtfsf=function(w){var s=thi" 
    + "s,p=w.parent,l=w.location;s.tfs=w;if(p&&p.location!=l&&p.location.host==l.host){s.tfs=p;return s.gtfsf(s.tfs)}return s.tfs};s.gtfs=function(){var s=this;if(!s.tfs){s.tfs=s.wd;if(!s.etfs)s.tfs=s.cet" 
    + "('gtfsf',s.tfs,'gtfset',s.gtfsoe,'gtfsfb')}return s.tfs};s.mrq=function(u){var s=this,l=s.rl[u],n,r;s.rl[u]=0;if(l)for(n=0;n<l.length;n++){r=l[n];s.mr(0,0,r.r,r.t,r.u)}};s.flushBufferedRequests=fun" 
    + "ction(){};s.mr=function(sess,q,rs,ta,u){var s=this,dc=s.dc,t1=s.trackingServer,t2=s.trackingServerSecure,tb=s.trackingServerBase,p='.sc',ns=s.visitorNamespace,un=s.cls(u?u:(ns?ns:s.fun)),r=new Obje" 
    + "ct,l,imn='s_i_'+(un),im,b,e;if(!rs){if(t1){if(t2&&s.ssl)t1=t2}else{if(!tb)tb='2o7.net';if(dc)dc=(''+dc).toLowerCase();else dc='d1';if(tb=='2o7.net'){if(dc=='d1')dc='112';else if(dc=='d2')dc='122';p" 
    + "=''}t1=un+'.'+dc+'.'+p+tb}rs='http'+(s.ssl?'s':'')+'://'+t1+'/b/ss/'+s.un+'/'+(s.mobile?'5.1':'1')+'/'+s.version+(s.tcn?'T':'')+'/'+sess+'?AQB=1&ndh=1'+(q?q:'')+'&AQE=1';if(s.isie&&!s.ismac)rs=s.fl" 
    + "(rs,2047)}if(s.d.images&&s.apv>=3&&(!s.isopera||s.apv>=7)&&(s.ns6<0||s.apv>=6.1)){if(!s.rc)s.rc=new Object;if(!s.rc[un]){s.rc[un]=1;if(!s.rl)s.rl=new Object;s.rl[un]=new Array;setTimeout('if(window" 
    + ".s_c_il)window.s_c_il['+s._in+'].mrq(\"'+un+'\")',750)}else{l=s.rl[un];if(l){r.t=ta;r.u=un;r.r=rs;l[l.length]=r;return ''}imn+='_'+s.rc[un];s.rc[un]++}im=s.wd[imn];if(!im)im=s.wd[imn]=new Image;im." 
    + "s_l=0;im.onload=new Function('e','this.s_l=1;var wd=window,s;if(wd.s_c_il){s=wd.s_c_il['+s._in+'];s.mrq(\"'+un+'\");s.nrs--;if(!s.nrs)s.m_m(\"rr\")}');if(!s.nrs){s.nrs=1;s.m_m('rs')}else s.nrs++;if" 
    + "(s.debugTracking){var d='AppMeasurement Debug: '+rs,dl=s.sp(rs,'&'),dln;for(dln=0;dln<dl.length;dln++)d+=\"\\n\\t\"+s.epa(dl[dln]);s.logDebug(d)}im.src=rs;if((!ta||ta=='_self'||ta=='_top'||(s.wd.na" 
    + "me&&ta==s.wd.name))&&rs.indexOf('&pe=')>=0){b=e=new Date;while(!im.s_l&&e.getTime()-b.getTime()<500)e=new Date}return ''}return '<im'+'g sr'+'c=\"'+rs+'\" width=1 height=1 border=0 alt=\"\">'};s.gg" 
    + "=function(v){var s=this;if(!s.wd['s_'+v])s.wd['s_'+v]='';return s.wd['s_'+v]};s.glf=function(t,a){if(t.substring(0,2)=='s_')t=t.substring(2);var s=this,v=s.gg(t);if(v)s[t]=v};s.gl=function(v){var s" 
    + "=this;if(s.pg)s.pt(v,',','glf',0)};s.rf=function(x){var s=this,y,i,j,h,p,l=0,q,a,b='',c='',t;if(x&&x.length>255){y=''+x;i=y.indexOf('?');if(i>0){q=y.substring(i+1);y=y.substring(0,i);h=y.toLowerCas" 
    + "e();j=0;if(h.substring(0,7)=='http://')j+=7;else if(h.substring(0,8)=='https://')j+=8;i=h.indexOf(\"/\",j);if(i>0){h=h.substring(j,i);p=y.substring(i);y=y.substring(0,i);if(h.indexOf('google')>=0)l" 
    + "=',q,ie,start,search_key,word,kw,cd,';else if(h.indexOf('yahoo.co')>=0)l=',p,ei,';if(l&&q){a=s.sp(q,'&');if(a&&a.length>1){for(j=0;j<a.length;j++){t=a[j];i=t.indexOf('=');if(i>0&&l.indexOf(','+t.su" 
    + "bstring(0,i)+',')>=0)b+=(b?'&':'')+t;else c+=(c?'&':'')+t}if(b&&c)q=b+'&'+c;else c=''}i=253-(q.length-c.length)-y.length;x=y+(i>0?p.substring(0,i):'')+'?'+q}}}}return x};s.s2q=function(k,v,vf,vfp,f" 
    + "){var s=this,qs='',sk,sv,sp,ss,nke,nk,nf,nfl=0,nfn,nfm;if(k==\"contextData\")k=\"c\";if(v){for(sk in v) {if((!f||sk.substring(0,f.length)==f)&&v[sk]&&(!vf||vf.indexOf(','+(vfp?vfp+'.':'')+sk+',')>=" 
    + "0)){nfm=0;if(nfl)for(nfn=0;nfn<nfl.length;nfn++)if(sk.substring(0,nfl[nfn].length)==nfl[nfn])nfm=1;if(!nfm){if(qs=='')qs+='&'+k+'.';sv=v[sk];if(f)sk=sk.substring(f.length);if(sk.length>0){nke=sk.in" 
    + "dexOf('.');if(nke>0){nk=sk.substring(0,nke);nf=(f?f:'')+nk+'.';if(!nfl)nfl=new Array;nfl[nfl.length]=nf;qs+=s.s2q(nk,v,vf,vfp,nf)}else{if(typeof(sv)=='boolean'){if(sv)sv='true';else sv='false'}if(s" 
    + "v){if(vfp=='retrieveLightData'&&f.indexOf('.contextData.')<0){sp=sk.substring(0,4);ss=sk.substring(4);if(sk=='transactionID')sk='xact';else if(sk=='channel')sk='ch';else if(sk=='campaign')sk='v0';e" 
    + "lse if(s.num(ss)){if(sp=='prop')sk='c'+ss;else if(sp=='eVar')sk='v'+ss;else if(sp=='list')sk='l'+ss;else if(sp=='hier'){sk='h'+ss;sv=sv.substring(0,255)}}}qs+='&'+s.ape(sk)+'='+s.ape(sv)}}}}}}if(qs" 
    + "!='')qs+='&.'+k}return qs};s.hav=function(){var s=this,qs='',l,fv='',fe='',mn,i,e;if(s.lightProfileID){l=s.va_m;fv=s.lightTrackVars;if(fv)fv=','+fv+','+s.vl_mr+','}else{l=s.va_t;if(s.pe||s.linkType" 
    + "){fv=s.linkTrackVars;fe=s.linkTrackEvents;if(s.pe){mn=s.pe.substring(0,1).toUpperCase()+s.pe.substring(1);if(s[mn]){fv=s[mn].trackVars;fe=s[mn].trackEvents}}}if(fv)fv=','+fv+','+s.vl_l+','+s.vl_l2;" 
    + "if(fe){fe=','+fe+',';if(fv)fv+=',events,'}if (s.events2)e=(e?',':'')+s.events2}for(i=0;i<l.length;i++){var k=l[i],v=s[k],b=k.substring(0,4),x=k.substring(4),n=parseInt(x),q=k;if(!v)if(k=='events'&&" 
    + "e){v=e;e=''}if(v&&(!fv||fv.indexOf(','+k+',')>=0)&&k!='linkName'&&k!='linkType'){if(k=='timestamp')q='ts';else if(k=='dynamicVariablePrefix')q='D';else if(k=='visitorID')q='vid';else if(k=='pageURL" 
    + "'){q='g';v=s.fl(v,255)}else if(k=='referrer'){q='r';v=s.fl(s.rf(v),255)}else if(k=='vmk'||k=='visitorMigrationKey')q='vmt';else if(k=='visitorMigrationServer'){q='vmf';if(s.ssl&&s.visitorMigrationS" 
    + "erverSecure)v=''}else if(k=='visitorMigrationServerSecure'){q='vmf';if(!s.ssl&&s.visitorMigrationServer)v=''}else if(k=='charSet'){q='ce';if(v.toUpperCase()=='AUTO')v='ISO8859-1';else if(s.em==2||s" 
    + ".em==3)v='UTF-8'}else if(k=='visitorNamespace')q='ns';else if(k=='cookieDomainPeriods')q='cdp';else if(k=='cookieLifetime')q='cl';else if(k=='variableProvider')q='vvp';else if(k=='currencyCode')q='" 
    + "cc';else if(k=='channel')q='ch';else if(k=='transactionID')q='xact';else if(k=='campaign')q='v0';else if(k=='resolution')q='s';else if(k=='colorDepth')q='c';else if(k=='javascriptVersion')q='j';els" 
    + "e if(k=='javaEnabled')q='v';else if(k=='cookiesEnabled')q='k';else if(k=='browserWidth')q='bw';else if(k=='browserHeight')q='bh';else if(k=='connectionType')q='ct';else if(k=='homepage')q='hp';else" 
    + " if(k=='plugins')q='p';else if(k=='events'){if(e)v+=(v?',':'')+e;if(fe)v=s.fs(v,fe)}else if(k=='events2')v='';else if(k=='contextData'){qs+=s.s2q('c',s[k],fv,k,0);v=''}else if(k=='lightProfileID')q" 
    + "='mtp';else if(k=='lightStoreForSeconds'){q='mtss';if(!s.lightProfileID)v=''}else if(k=='lightIncrementBy'){q='mti';if(!s.lightProfileID)v=''}else if(k=='retrieveLightProfiles')q='mtsr';else if(k==" 
    + "'deleteLightProfiles')q='mtsd';else if(k=='retrieveLightData'){if(s.retrieveLightProfiles)qs+=s.s2q('mts',s[k],fv,k,0);v=''}else if(s.num(x)){if(b=='prop')q='c'+n;else if(b=='eVar')q='v'+n;else if(" 
    + "b=='list')q='l'+n;else if(b=='hier'){q='h'+n;v=s.fl(v,255)}}if(v)qs+='&'+s.ape(q)+'='+(k.substring(0,3)!='pev'?s.ape(v):v)}}return qs};s.ltdf=function(t,h){t=t?t.toLowerCase():'';h=h?h.toLowerCase(" 
    + "):'';var qi=h.indexOf('?');h=qi>=0?h.substring(0,qi):h;if(t&&h.substring(h.length-(t.length+1))=='.'+t)return 1;return 0};s.ltef=function(t,h){t=t?t.toLowerCase():'';h=h?h.toLowerCase():'';if(t&&h." 
    + "indexOf(t)>=0)return 1;return 0};s.lt=function(h){var s=this,lft=s.linkDownloadFileTypes,lef=s.linkExternalFilters,lif=s.linkInternalFilters;lif=lif?lif:s.wd.location.hostname;h=h.toLowerCase();if(" 
    + "s.trackDownloadLinks&&lft&&s.pt(lft,',','ltdf',h))return 'd';if(s.trackExternalLinks&&h.substring(0,1)!='#'&&(lef||lif)&&(!lef||s.pt(lef,',','ltef',h))&&(!lif||!s.pt(lif,',','ltef',h)))return 'e';r" 
    + "eturn ''};s.lc=new Function('e','var s=s_c_il['+s._in+'],b=s.eh(this,\"onclick\");s.lnk=s.co(this);s.t();s.lnk=0;if(b)return this[b](e);return true');s.bc=new Function('e','var s=s_c_il['+s._in+']," 
    + "f,tcf;if(s.d&&s.d.all&&s.d.all.cppXYctnr)return;s.eo=e.srcElement?e.srcElement:e.target;tcf=new Function(\"s\",\"var e;try{if(s.eo&&(s.eo.tagName||s.eo.parentElement||s.eo.parentNode))s.t()}catch(e" 
    + "){}\");tcf(s);s.eo=0');s.oh=function(o){var s=this,l=s.wd.location,h=o.href?o.href:'',i,j,k,p;i=h.indexOf(':');j=h.indexOf('?');k=h.indexOf('/');if(h&&(i<0||(j>=0&&i>j)||(k>=0&&i>k))){p=o.protocol&" 
    + "&o.protocol.length>1?o.protocol:(l.protocol?l.protocol:'');i=l.pathname.lastIndexOf('/');h=(p?p+'//':'')+(o.host?o.host:(l.host?l.host:''))+(h.substring(0,1)!='/'?l.pathname.substring(0,i<0?0:i)+'/" 
    + "':'')+h}return h};s.ot=function(o){var t=o.tagName;if(o.tagUrn||(o.scopeName&&o.scopeName.toUpperCase()!='HTML'))return '';t=t&&t.toUpperCase?t.toUpperCase():'';if(t=='SHAPE')t='';if(t){if((t=='INP" 
    + "UT'||t=='BUTTON')&&o.type&&o.type.toUpperCase)t=o.type.toUpperCase();else if(!t&&o.href)t='A';}return t};s.oid=function(o){var s=this,t=s.ot(o),p,c,n='',x=0;if(t&&!o.s_oid){p=o.protocol;c=o.onclick" 
    + ";if(o.href&&(t=='A'||t=='AREA')&&(!c||!p||p.toLowerCase().indexOf('javascript')<0))n=s.oh(o);else if(c){n=s.rep(s.rep(s.rep(s.rep(''+c,\"\\r\",''),\"\\n\",''),\"\\t\",''),' ','');x=2}else if(t=='IN" 
    + "PUT'||t=='SUBMIT'){if(o.value)n=o.value;else if(o.innerText)n=o.innerText;else if(o.textContent)n=o.textContent;x=3}else if(o.src&&t=='IMAGE')n=o.src;if(n){o.s_oid=s.fl(n,100);o.s_oidt=x}}return o." 
    + "s_oid};s.rqf=function(t,un){var s=this,e=t.indexOf('='),u=e>=0?t.substring(0,e):'',q=e>=0?s.epa(t.substring(e+1)):'';if(u&&q&&(','+u+',').indexOf(','+un+',')>=0){if(u!=s.un&&s.un.indexOf(',')>=0)q=" 
    + "'&u='+u+q+'&u=0';return q}return ''};s.rq=function(un){if(!un)un=this.un;var s=this,c=un.indexOf(','),v=s.c_r('s_sq'),q='';if(c<0)return s.pt(v,'&','rqf',un);return s.pt(un,',','rq',0)};s.sqp=funct" 
    + "ion(t,a){var s=this,e=t.indexOf('='),q=e<0?'':s.epa(t.substring(e+1));s.sqq[q]='';if(e>=0)s.pt(t.substring(0,e),',','sqs',q);return 0};s.sqs=function(un,q){var s=this;s.squ[un]=q;return 0};s.sq=fun" 
    + "ction(q){var s=this,k='s_sq',v=s.c_r(k),x,c=0;s.sqq=new Object;s.squ=new Object;s.sqq[q]='';s.pt(v,'&','sqp',0);s.pt(s.un,',','sqs',q);v='';for(x in s.squ)if(x&&(!Object||!Object.prototype||!Object" 
    + ".prototype[x]))s.sqq[s.squ[x]]+=(s.sqq[s.squ[x]]?',':'')+x;for(x in s.sqq)if(x&&(!Object||!Object.prototype||!Object.prototype[x])&&s.sqq[x]&&(x==q||c<2)){v+=(v?'&':'')+s.sqq[x]+'='+s.ape(x);c++}re" 
    + "turn s.c_w(k,v,0)};s.wdl=new Function('e','var s=s_c_il['+s._in+'],r=true,b=s.eh(s.wd,\"onload\"),i,o,oc;if(b)r=this[b](e);for(i=0;i<s.d.links.length;i++){o=s.d.links[i];oc=o.onclick?\"\"+o.onclick" 
    + ":\"\";if((oc.indexOf(\"s_gs(\")<0||oc.indexOf(\".s_oc(\")>=0)&&oc.indexOf(\".tl(\")<0)s.eh(o,\"onclick\",0,s.lc);}return r');s.wds=function(){var s=this;if(s.apv>3&&(!s.isie||!s.ismac||s.apv>=5)){i" 
    + "f(s.b&&s.b.attachEvent)s.b.attachEvent('onclick',s.bc);else if(s.b&&s.b.addEventListener)s.b.addEventListener('click',s.bc,false);else s.eh(s.wd,'onload',0,s.wdl)}};s.vs=function(x){var s=this,v=s." 
    + "visitorSampling,g=s.visitorSamplingGroup,k='s_vsn_'+s.un+(g?'_'+g:''),n=s.c_r(k),e=new Date,y=e.getYear();e.setYear(y+10+(y<1900?1900:0));if(v){v*=100;if(!n){if(!s.c_w(k,x,e))return 0;n=x}if(n%1000" 
    + "0>v)return 0}return 1};s.dyasmf=function(t,m){if(t&&m&&m.indexOf(t)>=0)return 1;return 0};s.dyasf=function(t,m){var s=this,i=t?t.indexOf('='):-1,n,x;if(i>=0&&m){var n=t.substring(0,i),x=t.substring" 
    + "(i+1);if(s.pt(x,',','dyasmf',m))return n}return 0};s.uns=function(){var s=this,x=s.dynamicAccountSelection,l=s.dynamicAccountList,m=s.dynamicAccountMatch,n,i;s.un=s.un.toLowerCase();if(x&&l){if(!m)" 
    + "m=s.wd.location.host;if(!m.toLowerCase)m=''+m;l=l.toLowerCase();m=m.toLowerCase();n=s.pt(l,';','dyasf',m);if(n)s.un=n}i=s.un.indexOf(',');s.fun=i<0?s.un:s.un.substring(0,i)};s.sa=function(un){var s" 
    + "=this;s.un=un;if(!s.oun)s.oun=un;else if((','+s.oun+',').indexOf(','+un+',')<0)s.oun+=','+un;s.uns()};s.m_i=function(n,a){var s=this,m,f=n.substring(0,1),r,l,i;if(!s.m_l)s.m_l=new Object;if(!s.m_nl" 
    + ")s.m_nl=new Array;m=s.m_l[n];if(!a&&m&&m._e&&!m._i)s.m_a(n);if(!m){m=new Object,m._c='s_m';m._in=s.wd.s_c_in;m._il=s._il;m._il[m._in]=m;s.wd.s_c_in++;m.s=s;m._n=n;m._l=new Array('_c','_in','_il','_" 
    + "i','_e','_d','_dl','s','n','_r','_g','_g1','_t','_t1','_x','_x1','_rs','_rr','_l');s.m_l[n]=m;s.m_nl[s.m_nl.length]=n}else if(m._r&&!m._m){r=m._r;r._m=m;l=m._l;for(i=0;i<l.length;i++)if(m[l[i]])r[l" 
    + "[i]]=m[l[i]];r._il[r._in]=r;m=s.m_l[n]=r}if(f==f.toUpperCase())s[n]=m;return m};s.m_a=new Function('n','g','e','if(!g)g=\"m_\"+n;var s=s_c_il['+s._in+'],c=s[g+\"_c\"],m,x,f=0;if(!c)c=s.wd[\"s_\"+g+" 
    + "\"_c\"];if(c&&s_d)s[g]=new Function(\"s\",s_ft(s_d(c)));x=s[g];if(!x)x=s.wd[\\'s_\\'+g];if(!x)x=s.wd[g];m=s.m_i(n,1);if(x&&(!m._i||g!=\"m_\"+n)){m._i=f=1;if((\"\"+x).indexOf(\"function\")>=0)x(s);e" 
    + "lse s.m_m(\"x\",n,x,e)}m=s.m_i(n,1);if(m._dl)m._dl=m._d=0;s.dlt();return f');s.m_m=function(t,n,d,e){t='_'+t;var s=this,i,x,m,f='_'+t,r=0,u;if(s.m_l&&s.m_nl)for(i=0;i<s.m_nl.length;i++){x=s.m_nl[i]" 
    + ";if(!n||x==n){m=s.m_i(x);u=m[t];if(u){if((''+u).indexOf('function')>=0){if(d&&e)u=m[t](d,e);else if(d)u=m[t](d);else u=m[t]()}}if(u)r=1;u=m[t+1];if(u&&!m[f]){if((''+u).indexOf('function')>=0){if(d&" 
    + "&e)u=m[t+1](d,e);else if(d)u=m[t+1](d);else u=m[t+1]()}}m[f]=1;if(u)r=1}}return r};s.m_ll=function(){var s=this,g=s.m_dl,i,o;if(g)for(i=0;i<g.length;i++){o=g[i];if(o)s.loadModule(o.n,o.u,o.d,o.l,o." 
    + "e,1);g[i]=0}};s.loadModule=function(n,u,d,l,e,ln){var s=this,m=0,i,g,o=0,f1,f2,c=s.h?s.h:s.b,b,tcf;if(n){i=n.indexOf(':');if(i>=0){g=n.substring(i+1);n=n.substring(0,i)}else g=\"m_\"+n;m=s.m_i(n)}i" 
    + "f((l||(n&&!s.m_a(n,g)))&&u&&s.d&&c&&s.d.createElement){if(d){m._d=1;m._dl=1}if(ln){if(s.ssl)u=s.rep(u,'http:','https:');i='s_s:'+s._in+':'+n+':'+g;b='var s=s_c_il['+s._in+'],o=s.d.getElementById(\"" 
    + "'+i+'\");if(s&&o){if(!o.l&&s.wd.'+g+'){o.l=1;if(o.i)clearTimeout(o.i);o.i=0;s.m_a(\"'+n+'\",\"'+g+'\"'+(e?',\"'+e+'\"':'')+')}';f2=b+'o.c++;if(!s.maxDelay)s.maxDelay=250;if(!o.l&&o.c<(s.maxDelay*2)" 
    + "/100)o.i=setTimeout(o.f2,100)}';f1=new Function('e',b+'}');tcf=new Function('s','c','i','u','f1','f2','var e,o=0;try{o=s.d.createElement(\"script\");if(o){o.type=\"text/javascript\";'+(n?'o.id=i;o." 
    + "defer=true;o.onload=o.onreadystatechange=f1;o.f2=f2;o.l=0;':'')+'o.src=u;c.appendChild(o);'+(n?'o.c=0;o.i=setTimeout(f2,100)':'')+'}}catch(e){o=0}return o');o=tcf(s,c,i,u,f1,f2)}else{o=new Object;o" 
    + ".n=n+':'+g;o.u=u;o.d=d;o.l=l;o.e=e;g=s.m_dl;if(!g)g=s.m_dl=new Array;i=0;while(i<g.length&&g[i])i++;g[i]=o}}else if(n){m=s.m_i(n);m._e=1}return m};s.voa=function(vo,r){var s=this,l=s.va_g,i,k,v,x;f" 
    + "or(i=0;i<l.length;i++){k=l[i];v=vo[k];if(v||vo['!'+k]){if(!r&&(k==\"contextData\"||k==\"retrieveLightData\")&&s[k])for(x in s[k])if(!v[x])v[x]=s[k][x];s[k]=v}}};s.vob=function(vo){var s=this,l=s.va" 
    + "_g,i,k;for(i=0;i<l.length;i++){k=l[i];vo[k]=s[k];if(!vo[k])vo['!'+k]=1}};s.dlt=new Function('var s=s_c_il['+s._in+'],d=new Date,i,vo,f=0;if(s.dll)for(i=0;i<s.dll.length;i++){vo=s.dll[i];if(vo){if(!" 
    + "s.m_m(\"d\")||d.getTime()-vo._t>=s.maxDelay){s.dll[i]=0;s.t(vo)}else f=1}}if(s.dli)clearTimeout(s.dli);s.dli=0;if(f){if(!s.dli)s.dli=setTimeout(s.dlt,s.maxDelay)}else s.dll=0');s.dl=function(vo){va" 
    + "r s=this,d=new Date;if(!vo)vo=new Object;s.vob(vo);vo._t=d.getTime();if(!s.dll)s.dll=new Array;s.dll[s.dll.length]=vo;if(!s.maxDelay)s.maxDelay=250;s.dlt()};s.track=s.t=function(vo){var s=this,trk=" 
    + "1,tm=new Date,sed=Math&&Math.random?Math.floor(Math.random()*10000000000000):tm.getTime(),sess='s'+Math.floor(tm.getTime()/10800000)%10+sed,y=tm.getYear(),vt=tm.getDate()+'/'+tm.getMonth()+'/'+(y<1" 
    + "900?y+1900:y)+' '+tm.getHours()+':'+tm.getMinutes()+':'+tm.getSeconds()+' '+tm.getDay()+' '+tm.getTimezoneOffset(),tcf,tfs=s.gtfs(),ta=-1,q='',qs='',code='',vb=new Object;s.gl(s.vl_g);s.uns();s.m_l" 
    + "l();if(!s.td){var tl=tfs.location,a,o,i,x='',c='',v='',p='',bw='',bh='',j='1.0',k=s.c_w('s_cc','true',0)?'Y':'N',hp='',ct='',pn=0,ps;if(String&&String.prototype){j='1.1';if(j.match){j='1.2';if(tm.s" 
    + "etUTCDate){j='1.3';if(s.isie&&s.ismac&&s.apv>=5)j='1.4';if(pn.toPrecision){j='1.5';a=new Array;if(a.forEach){j='1.6';i=0;o=new Object;tcf=new Function('o','var e,i=0;try{i=new Iterator(o)}catch(e){" 
    + "}return i');i=tcf(o);if(i&&i.next)j='1.7'}}}}}if(s.apv>=4)x=screen.width+'x'+screen.height;if(s.isns||s.isopera){if(s.apv>=3){v=s.n.javaEnabled()?'Y':'N';if(s.apv>=4){c=screen.pixelDepth;bw=s.wd.in" 
    + "nerWidth;bh=s.wd.innerHeight}}s.pl=s.n.plugins}else if(s.isie){if(s.apv>=4){v=s.n.javaEnabled()?'Y':'N';c=screen.colorDepth;if(s.apv>=5){bw=s.d.documentElement.offsetWidth;bh=s.d.documentElement.of" 
    + "fsetHeight;if(!s.ismac&&s.b){tcf=new Function('s','tl','var e,hp=0;try{s.b.addBehavior(\"#default#homePage\");hp=s.b.isHomePage(tl)?\"Y\":\"N\"}catch(e){}return hp');hp=tcf(s,tl);tcf=new Function('" 
    + "s','var e,ct=0;try{s.b.addBehavior(\"#default#clientCaps\");ct=s.b.connectionType}catch(e){}return ct');ct=tcf(s)}}}else r=''}if(s.pl)while(pn<s.pl.length&&pn<30){ps=s.fl(s.pl[pn].name,100)+';';if(" 
    + "p.indexOf(ps)<0)p+=ps;pn++}s.resolution=x;s.colorDepth=c;s.javascriptVersion=j;s.javaEnabled=v;s.cookiesEnabled=k;s.browserWidth=bw;s.browserHeight=bh;s.connectionType=ct;s.homepage=hp;s.plugins=p;" 
    + "s.td=1}if(vo){s.vob(vb);s.voa(vo)}if((vo&&vo._t)||!s.m_m('d')){if(s.usePlugins)s.doPlugins(s);var l=s.wd.location,r=tfs.document.referrer;if(!s.pageURL)s.pageURL=l.href?l.href:l;if(!s.referrer&&!s." 
    + "_1_referrer){s.referrer=r;s._1_referrer=1}s.m_m('g');if(s.lnk||s.eo){var o=s.eo?s.eo:s.lnk,p=s.pageName,w=1,t=s.ot(o),n=s.oid(o),x=o.s_oidt,h,l,i,oc;if(s.eo&&o==s.eo){while(o&&!n&&t!='BODY'){o=o.pa" 
    + "rentElement?o.parentElement:o.parentNode;if(o){t=s.ot(o);n=s.oid(o);x=o.s_oidt}}if(o){oc=o.onclick?''+o.onclick:'';if((oc.indexOf('s_gs(')>=0&&oc.indexOf('.s_oc(')<0)||oc.indexOf('.tl(')>=0)o=0}}if" 
    + "(o){if(n)ta=o.target;h=s.oh(o);i=h.indexOf('?');h=s.linkLeaveQueryString||i<0?h:h.substring(0,i);l=s.linkName;t=s.linkType?s.linkType.toLowerCase():s.lt(h);if(t&&(h||l)){s.pe='lnk_'+(t=='d'||t=='e'" 
    + "?t:'o');q+='&pe='+s.pe+(h?'&pev1='+s.ape(h):'')+(l?'&pev2='+s.ape(l):'');}else trk=0;if(s.trackInlineStats){if(!p){p=s.pageURL;w=0}t=s.ot(o);i=o.sourceIndex;if(s.gg('objectID')){n=s.gg('objectID');" 
    + "x=1;i=1}if(p&&n&&t)qs='&pid='+s.ape(s.fl(p,255))+(w?'&pidt='+w:'')+'&oid='+s.ape(s.fl(n,100))+(x?'&oidt='+x:'')+'&ot='+s.ape(t)+(i?'&oi='+i:'')}}else trk=0}if(trk||qs){s.sampled=s.vs(sed);if(trk){i" 
    + "f(s.sampled)code=s.mr(sess,(vt?'&t='+s.ape(vt):'')+s.hav()+q+(qs?qs:s.rq()),0,ta);qs='';s.m_m('t');if(s.p_r)s.p_r();s.referrer=s.lightProfileID=s.retrieveLightProfiles=s.deleteLightProfiles=''}s.sq" 
    + "(qs)}}else s.dl(vo);if(vo)s.voa(vb,1);s.lnk=s.eo=s.linkName=s.linkType=s.wd.s_objectID=s.ppu=s.pe=s.pev1=s.pev2=s.pev3='';if(s.pg)s.wd.s_lnk=s.wd.s_eo=s.wd.s_linkName=s.wd.s_linkType='';return code" 
    + "};s.trackLink=s.tl=function(o,t,n,vo){var s=this;s.lnk=s.co(o);s.linkType=t;s.linkName=n;s.t(vo)};s.trackLight=function(p,ss,i,vo){var s=this;s.lightProfileID=p;s.lightStoreForSeconds=ss;s.lightInc" 
    + "rementBy=i;s.t(vo)};s.setTagContainer=function(n){var s=this,l=s.wd.s_c_il,i,t,x,y;s.tcn=n;if(l)for(i=0;i<l.length;i++){t=l[i];if(t&&t._c=='s_l'&&t.tagContainerName==n){s.voa(t);if(t.lmq)for(i=0;i<" 
    + "t.lmq.length;i++){x=t.lmq[i];y='m_'+x.n;if(!s[y]&&!s[y+'_c']){s[y]=t[y];s[y+'_c']=t[y+'_c']}s.loadModule(x.n,x.u,x.d)}if(t.ml)for(x in t.ml)if(s[x]){y=s[x];x=t.ml[x];for(i in x)if(!Object.prototype" 
    + "[i]){if(typeof(x[i])!='function'||(''+x[i]).indexOf('s_c_il')<0)y[i]=x[i]}}if(t.mmq)for(i=0;i<t.mmq.length;i++){x=t.mmq[i];if(s[x.m]){y=s[x.m];if(y[x.f]&&typeof(y[x.f])=='function'){if(x.a)y[x.f].a" 
    + "pply(y,x.a);else y[x.f].apply(y)}}}if(t.tq)for(i=0;i<t.tq.length;i++)s.t(t.tq[i]);t.s=s;return}}};s.wd=window;s.ssl=(s.wd.location.protocol.toLowerCase().indexOf('https')>=0);s.d=document;s.b=s.d.b" 
    + "ody;if(s.d.getElementsByTagName){s.h=s.d.getElementsByTagName('HEAD');if(s.h)s.h=s.h[0]}s.n=navigator;s.u=s.n.userAgent;s.ns6=s.u.indexOf('Netscape6/');var apn=s.n.appName,v=s.n.appVersion,ie=v.ind" 
    + "exOf('MSIE '),o=s.u.indexOf('Opera '),i;if(v.indexOf('Opera')>=0||o>0)apn='Opera';s.isie=(apn=='Microsoft Internet Explorer');s.isns=(apn=='Netscape');s.isopera=(apn=='Opera');s.ismac=(s.u.indexOf(" 
    + "'Mac')>=0);if(o>0)s.apv=parseFloat(s.u.substring(o+6));else if(ie>0){s.apv=parseInt(i=v.substring(ie+5));if(s.apv>3)s.apv=parseFloat(i)}else if(s.ns6>0)s.apv=parseFloat(s.u.substring(s.ns6+10));els" 
    + "e s.apv=parseFloat(v);s.em=0;if(s.em.toPrecision)s.em=3;else if(String.fromCharCode){i=escape(String.fromCharCode(256)).toUpperCase();s.em=(i=='%C4%80'?2:(i=='%U0100'?1:0))}if(s.oun)s.sa(s.oun);s.s" 
    + "a(un);s.vl_l='dynamicVariablePrefix,visitorID,vmk,visitorMigrationKey,visitorMigrationServer,visitorMigrationServerSecure,ppu,charSet,visitorNamespace,cookieDomainPeriods,cookieLifetime,pageName,pa" 
    + "geURL,referrer,currencyCode';s.va_l=s.sp(s.vl_l,',');s.vl_mr=s.vl_m='charSet,visitorNamespace,cookieDomainPeriods,cookieLifetime,contextData,lightProfileID,lightStoreForSeconds,lightIncrementBy';s." 
    + "vl_t=s.vl_l+',variableProvider,channel,server,pageType,transactionID,purchaseID,campaign,state,zip,events,events2,products,linkName,linkType,contextData,lightProfileID,lightStoreForSeconds,lightInc" 
    + "rementBy,retrieveLightProfiles,deleteLightProfiles,retrieveLightData';var n;for(n=1;n<=75;n++){s.vl_t+=',prop'+n+',eVar'+n;s.vl_m+=',prop'+n+',eVar'+n}for(n=1;n<=5;n++)s.vl_t+=',hier'+n;for(n=1;n<=" 
    + "3;n++)s.vl_t+=',list'+n;s.va_m=s.sp(s.vl_m,',');s.vl_l2=',tnt,pe,pev1,pev2,pev3,resolution,colorDepth,javascriptVersion,javaEnabled,cookiesEnabled,browserWidth,browserHeight,connectionType,homepage" 
    + ",plugins';s.vl_t+=s.vl_l2;s.va_t=s.sp(s.vl_t,',');s.vl_g=s.vl_t+',trackingServer,trackingServerSecure,trackingServerBase,fpCookieDomainPeriods,disableBufferedRequests,mobile,visitorSampling,visitor" 
    + "SamplingGroup,dynamicAccountSelection,dynamicAccountList,dynamicAccountMatch,trackDownloadLinks,trackExternalLinks,trackInlineStats,linkLeaveQueryString,linkDownloadFileTypes,linkExternalFilters,li" 
    + "nkInternalFilters,linkTrackVars,linkTrackEvents,linkNames,lnk,eo,lightTrackVars,_1_referrer,un';s.va_g=s.sp(s.vl_g,',');s.pg=pg;s.gl(s.vl_g);s.contextData=new Object;s.retrieveLightData=new Object;" 
    + "if(!ss)s.wds();if(pg){s.wd.s_co=function(o){s_gi(\"_\",1,1).co(o)};s.wd.s_gs=function(un){s_gi(un,1,1).t()};s.wd.s_dc=function(un){s_gi(un,1).t()}}", 
    w = window, l = w.s_c_il, n = navigator, u = n.userAgent, v = n.appVersion, e = v.indexOf('MSIE '), m = u.indexOf('Netscape6/'), a, i, j, x, s;
    if (un) {
        un = un.toLowerCase();
        if (l)
            for (j = 0; j < 2; j++)
                for (i = 0; i < l.length; i++) {
                    s = l[i];
                    x = s._c;
                    if ((!x || x == 's_c' || (j > 0 && x == 's_l')) && (s.oun == un || (s.fs && s.sa && s.fs(s.oun, un)))) {
                        if (s.sa)
                            s.sa(un);
                        if (x == 's_c')
                            return s
                    } else
                        s = 0
                }
    }
    w.s_an = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
    w.s_sp = new Function("x", "d", "var a=new Array,i=0,j;if(x){if(x.split)a=x.split(d);else if(!d)for(i=0;i<x.length;i++)a[a.length]=x.substring(i,i+1);else while(i>=0){j=x.indexOf(d,i);a[a.length]=x.subst" 
    + "ring(i,j<0?x.length:j);i=j;if(i>=0)i+=d.length}}return a");
    w.s_jn = new Function("a", "d", "var x='',i,j=a.length;if(a&&j>0){x=a[0];if(j>1){if(a.join)x=a.join(d);else for(i=1;i<j;i++)x+=d+a[i]}}return x");
    w.s_rep = new Function("x", "o", "n", "return s_jn(s_sp(x,o),n)");
    w.s_d = new Function("x", "var t='`^@$#',l=s_an,l2=new Object,x2,d,b=0,k,i=x.lastIndexOf('~~'),j,v,w;if(i>0){d=x.substring(0,i);x=x.substring(i+2);l=s_sp(l,'');for(i=0;i<62;i++)l2[l[i]]=i;t=s_sp(t,'');d" 
    + "=s_sp(d,'~');i=0;while(i<5){v=0;if(x.indexOf(t[i])>=0) {x2=s_sp(x,t[i]);for(j=1;j<x2.length;j++){k=x2[j].substring(0,1);w=t[i]+k;if(k!=' '){v=1;w=d[b+l2[k]]}x2[j]=w+x2[j].substring(1)}}if(v)x=s_jn(" 
    + "x2,'');else{w=t[i]+' ';if(x.indexOf(w)>=0)x=s_rep(x,w,t[i]);i++;b+=62}}}return x");
    w.s_fe = new Function("c", "return s_rep(s_rep(s_rep(c,'\\\\','\\\\\\\\'),'\"','\\\\\"'),\"\\n\",\"\\\\n\")");
    w.s_fa = new Function("f", "var s=f.indexOf('(')+1,e=f.indexOf(')'),a='',c;while(s>=0&&s<e){c=f.substring(s,s+1);if(c==',')a+='\",\"';else if((\"\\n\\r\\t \").indexOf(c)<0)a+=c;s++}return a?'\"'+a+'\"':" 
    + "a");
    w.s_ft = new Function("c", "c+='';var s,e,o,a,d,q,f,h,x;s=c.indexOf('=function(');while(s>=0){s++;d=1;q='';x=0;f=c.substring(s);a=s_fa(f);e=o=c.indexOf('{',s);e++;while(d>0){h=c.substring(e,e+1);if(q){i" 
    + "f(h==q&&!x)q='';if(h=='\\\\')x=x?0:1;else x=0}else{if(h=='\"'||h==\"'\")q=h;if(h=='{')d++;if(h=='}')d--}if(d>0)e++}c=c.substring(0,s)+'new Function('+(a?a+',':'')+'\"'+s_fe(c.substring(o+1,e))+'\")" 
    + "'+c.substring(e+1);s=c.indexOf('=function(')}return c;");
    c = s_d(c);
    if (e > 0) {
        a = parseInt(i = v.substring(e + 5));
        if (a > 3)
            a = parseFloat(i)
    } else if (m > 0)
        a = parseFloat(u.substring(m + 10));
    else
        a = parseFloat(v);
    if (a < 5 || v.indexOf('Opera') >= 0 || u.indexOf('Opera') >= 0)
        c = s_ft(c);
    if (!s) {
        s = new Object;
        if (!w.s_c_in) {
            w.s_c_il = new Array;
            w.s_c_in = 0
        }
        s._il = w.s_c_il;
        s._in = w.s_c_in;
        s._il[s._in] = s;
        w.s_c_in++;
    }
    s._c = 's_c';
    (new Function("s", "un", "pg", "ss", c))(s, un, pg, ss);
    return s
}
function s_giqf() {
    var w = window, q = w.s_giq, i, t, s;
    if (q)
        for (i = 0; i < q.length; i++) {
            t = q[i];
            s = s_gi(t.oun);
            s.sa(t.un);
            s.setTagContainer(t.tagContainerName)
        }
    w.s_giq = 0
}
s_giqf()


/**************************************************************************************



/common/js/omniture/s_code_library.js



**************************************************************************************/
if (s) {
    s.ctcTrack = function() {
        setOmniVars(s.charSet, s.server, s.channel, s.prop2, s.prop3, s.prop1, '', 'Support', 'ClickToCall');
        s.t();
    };
    s.meetingsLinksTrack = function(varText) {
        setOmniVars(s.charSet, s.server, s.channel, s.prop2, s.prop3, s.prop1, '', 'Meetings', varText);
        s.t();
    };
}

// Assembles an associated JS 1.0 array of the page naming vars
function createParams(p0, p1, p2, p3, p4, p5, p6, p7) {
    return arguments;
}

// Delimits array members of associative param object and returns the string
function delimit(params) {
    var i;
    var returnVal = [];
    for (i = 0; i < params.length; i++) {
        if (params[i]) {
            returnVal.push(params[i]);
        }
    }
    return returnVal.join(":");
}

// sets all pertinent Omniture traffic vars
function setOmniVarsYUI(omni_charset, omni_server, omni_channel, omni_brand, omni_lang, omni_propID, omni_hotelBrand, omni_section, omni_subsection, omni_page, omni_detail1, omni_detail2, omni_detail3) {

    // Staying compatible with JS 1.0 specs
    // Handling undefined values being passed
    if (omni_charset == null)
        omni_charset = "";
    if (omni_server == null)
        omni_server = "";
    if (omni_channel == null)
        omni_channel = "";
    if (omni_brand == null)
        omni_brand = "";
    if (omni_lang == null)
        omni_lang = "";
    if (omni_propID == null)
        omni_propID = "noID";
    if (omni_hotelBrand == null)
        omni_hotelBrand = "";
    if (omni_section == null)
        omni_section = "";
    if (omni_subsection == null)
        omni_subsection = "";
    if (omni_page == null)
        omni_page = "";
    if (omni_detail1 == null)
        omni_detail1 = "";
    if (omni_detail2 == null)
        omni_detail2 = "";
    if (omni_detail3 == null)
        omni_detail3 = "";
    
    s.charSet = delimit(createParams(omni_charset));
    
    s.server = delimit(createParams(omni_server));
    s.channel = delimit(createParams(omni_channel));
    
    if ((omni_section.length > 0)) {
        s.pageName = delimit(createParams(omni_lang, omni_brand, omni_propID, omni_section, omni_subsection, omni_page, omni_detail1, omni_detail2, omni_detail3));
    } 
    else {
        s.pageName = "";
    }
    
    s.prop1 = delimit(createParams(omni_propID));
    s.prop2 = delimit(createParams(omni_brand));
    s.prop3 = delimit(createParams(omni_lang));
    
    s.prop8 = delimit(createParams(omni_brand, omni_lang));
    
    s.prop9 = delimit(createParams(omni_section));
    s.prop10 = delimit(createParams(omni_section, omni_subsection));
    s.prop11 = delimit(createParams(omni_section, omni_subsection, omni_page));
    // s.prop12 = delimit(createParams(omni_section, omni_subsection, omni_page, omni_detail1, omni_detail2, omni_detail3));
    
    s.prop13 = delimit(createParams(omni_brand, omni_section));
    //      s.prop14 = delimit(createParams(omni_brand, omni_section, omni_subsection));
    //      s.prop15 = delimit(createParams(omni_brand, omni_section, omni_subsection, omni_page));
    //      s.prop16 = delimit(createParams(omni_brand, omni_section, omni_subsection, omni_page, omni_detail1, omni_detail2, omni_detail3));
    
    s.prop17 = delimit(createParams(omni_lang, omni_section));
    //      s.prop18 = delimit(createParams(omni_lang, omni_section, omni_subsection));
    //      s.prop19 = delimit(createParams(omni_lang, omni_section, omni_subsection, omni_page));
    //      //s.prop20 = delimit(createParams(omni_lang, omni_section, omni_subsection, omni_page, omni_detail1, omni_detail2, omni_detail3));
    //
    //      s.prop21 = delimit(createParams(omni_brand, omni_lang,omni_section));
    //      s.prop22 = delimit(createParams(omni_brand, omni_lang,omni_section, omni_subsection));
    //      //s.prop23 = delimit(createParams(omni_brand, omni_lang,omni_section, omni_subsection, omni_page));
    //      //s.prop24 = delimit(createParams(omni_brand, omni_lang,omni_section, omni_subsection, omni_page, omni_detail1, omni_detail2, omni_detail3));
    //
    //      s.prop25 = delimit(createParams(omni_propID, omni_section, omni_subsection));
    //      s.prop26 = delimit(createParams(omni_propID, omni_section, omni_subsection, omni_page));
    //      //s.prop27 = delimit(createParams(omni_propID, omni_section, omni_subsection, omni_page, omni_detail1, omni_detail2, omni_detail3));
    //
    //      s.prop32 = delimit(createParams(omni_propID, omni_lang, omni_section, omni_subsection));
    //s.prop33 = delimit(createParams(omni_propID, omni_lang, omni_section, omni_subsection, omni_page));

    //s.prop34 = delimit(createParams(omni_propID, omni_section));
    
    if ((omni_propID.length > 0) && (omni_propID != "noID") && (omni_hotelBrand.length > 0)) {
        s.prop35 = delimit(createParams(omni_hotelBrand, omni_section, omni_subsection));
    //s.prop36 = delimit(createParams(omni_hotelBrand, omni_section, omni_subsection, omni_page));
    //s.prop37 = delimit(createParams(omni_brand, omni_hotelBrand, omni_section, omni_subsection));
    //s.prop38 = delimit(createParams(omni_brand, omni_hotelBrand, omni_section, omni_subsection, omni_page));
    } 
    else {
        s.prop35 = "";
    //s.prop36 = "";
    //s.prop37 = "";
    //s.prop38 = "";
    }
    var s_code = s.t();
}

// sets all pertinent Omniture traffic vars
function setOmniVars(omni_charset, omni_server, omni_channel, omni_brand, omni_lang, omni_propID, omni_hotelBrand, omni_section, omni_subsection, omni_page, omni_detail1, omni_detail2, omni_detail3) {

    // Staying compatible with JS 1.0 specs
    // Handling undefined values being passed
    if (omni_charset == null)
        omni_charset = "";
    if (omni_server == null)
        omni_server = "";
    if (omni_channel == null)
        omni_channel = "";
    if (omni_brand == null)
        omni_brand = "";
    if (omni_lang == null)
        omni_lang = "";
    if (omni_propID == null)
        omni_propID = "noID";
    if (omni_hotelBrand == null)
        omni_hotelBrand = "";
    if (omni_section == null)
        omni_section = "";
    if (omni_subsection == null)
        omni_subsection = "";
    if (omni_page == null)
        omni_page = "";
    if (omni_detail1 == null)
        omni_detail1 = "";
    if (omni_detail2 == null)
        omni_detail2 = "";
    if (omni_detail3 == null)
        omni_detail3 = "";
    
    s.charSet = delimit(createParams(omni_charset));
    
    s.server = delimit(createParams(omni_server));
    s.channel = delimit(createParams(omni_channel));
    
    if ((omni_section.length > 0)) {
        s.pageName = delimit(createParams(omni_lang, omni_brand, omni_propID, omni_section, omni_subsection, omni_page, omni_detail1, omni_detail2, omni_detail3));
    } 
    else {
        s.pageName = "";
    }
    
    s.prop1 = delimit(createParams(omni_propID));
    s.prop2 = delimit(createParams(omni_brand));
    s.prop3 = delimit(createParams(omni_lang));
    
    s.prop8 = delimit(createParams(omni_brand, omni_lang));
    
    s.prop9 = delimit(createParams(omni_section));
    s.prop10 = delimit(createParams(omni_section, omni_subsection));
    s.prop11 = delimit(createParams(omni_section, omni_subsection, omni_page));
    //s.prop12 = delimit(createParams(omni_section, omni_subsection, omni_page, omni_detail1, omni_detail2, omni_detail3));
    
    s.prop13 = delimit(createParams(omni_brand, omni_section));
    //      s.prop14 = delimit(createParams(omni_brand, omni_section, omni_subsection));
    //      s.prop15 = delimit(createParams(omni_brand, omni_section, omni_subsection, omni_page));
    //      s.prop16 = delimit(createParams(omni_brand, omni_section, omni_subsection, omni_page, omni_detail1, omni_detail2, omni_detail3));
    
    s.prop17 = delimit(createParams(omni_lang, omni_section));
    //      s.prop18 = delimit(createParams(omni_lang, omni_section, omni_subsection));
    //      s.prop19 = delimit(createParams(omni_lang, omni_section, omni_subsection, omni_page));
    //      //s.prop20 = delimit(createParams(omni_lang, omni_section, omni_subsection, omni_page, omni_detail1, omni_detail2, omni_detail3));
    //
    //      s.prop21 = delimit(createParams(omni_brand, omni_lang,omni_section));
    //      s.prop22 = delimit(createParams(omni_brand, omni_lang,omni_section, omni_subsection));
    //      //s.prop23 = delimit(createParams(omni_brand, omni_lang,omni_section, omni_subsection, omni_page));
    //      //s.prop24 = delimit(createParams(omni_brand, omni_lang,omni_section, omni_subsection, omni_page, omni_detail1, omni_detail2, omni_detail3));
    //
    //      s.prop25 = delimit(createParams(omni_propID, omni_section, omni_subsection));
    //      s.prop26 = delimit(createParams(omni_propID, omni_section, omni_subsection, omni_page));
    //      //s.prop27 = delimit(createParams(omni_propID, omni_section, omni_subsection, omni_page, omni_detail1, omni_detail2, omni_detail3));
    //
    //      s.prop32 = delimit(createParams(omni_propID, omni_lang, omni_section, omni_subsection));
    //s.prop33 = delimit(createParams(omni_propID, omni_lang, omni_section, omni_subsection, omni_page));

    //s.prop34 = delimit(createParams(omni_propID, omni_section));
    
    if ((omni_propID.length > 0) && (omni_propID != "noID") && (omni_hotelBrand.length > 0)) {
        s.prop35 = delimit(createParams(omni_hotelBrand, omni_section, omni_subsection));
    //s.prop36 = delimit(createParams(omni_hotelBrand, omni_section, omni_subsection, omni_page));
    //s.prop37 = delimit(createParams(omni_brand, omni_hotelBrand, omni_section, omni_subsection));
    //s.prop38 = delimit(createParams(omni_brand, omni_hotelBrand, omni_section, omni_subsection, omni_page));
    } 
    else {
        s.prop35 = "";
    //s.prop36 = "";
    //s.prop37 = "";
    //s.prop38 = "";
    }
}


/**************************************************************************************



/common/js/omniture/mbox.js



**************************************************************************************/
var mboxCopyright = "Copyright 1996-2012. Adobe Systems Incorporated. All rights reserved.";
mboxUrlBuilder = function(a, b) {
    this.a = a;
    this.b = b;
    this.c = new Array();
    this.d = function(e) {
        return e;
    };
    this.f = null;
};
mboxUrlBuilder.prototype.addNewParameter = function(g, h) {
    this.c.push({name: g,value: h});
    return this;
};
mboxUrlBuilder.prototype.addParameterIfAbsent = function(g, h) {
    if (h) {
        for (var i = 0; i < this.c.length; i++) {
            var j = this.c[i];
            if (j.name === g) {
                return this;
            }
        }
        this.checkInvalidCharacters(g);
        return this.addNewParameter(g, h);
    }
};
mboxUrlBuilder.prototype.addParameter = function(g, h) {
    this.checkInvalidCharacters(g);
    for (var i = 0; i < this.c.length; i++) {
        var j = this.c[i];
        if (j.name === g) {
            j.value = h;
            return this;
        }
    }
    return this.addNewParameter(g, h);
};
mboxUrlBuilder.prototype.addParameters = function(c) {
    if (!c) {
        return this;
    }
    for (var i = 0; i < c.length; i++) {
        var k = c[i].indexOf('=');
        if (k == -1 || k == 0) {
            continue;
        }
        this.addParameter(c[i].substring(0, k), c[i].substring(k + 1, c[i].length));
    }
    return this;
};
mboxUrlBuilder.prototype.setServerType = function(l) {
    this.m = l;
};
mboxUrlBuilder.prototype.setBasePath = function(f) {
    this.f = f;
};
mboxUrlBuilder.prototype.setUrlProcessAction = function(n) {
    this.d = n;
};
mboxUrlBuilder.prototype.buildUrl = function() {
    var o = this.f ? this.f : '/m2/' + this.b + '/mbox/' + this.m;
    var p = document.location.protocol == 'file:' ? 'http:' : document.location.protocol;
    var e = p + "//" + this.a + o;
    var q = e.indexOf('?') != -1 ? '&' : '?';
    for (var i = 0; i < this.c.length; i++) {
        var j = this.c[i];
        e += q + encodeURIComponent(j.name) + '=' + encodeURIComponent(j.value);
        q = '&';
    }
    return this.r(this.d(e));
};
mboxUrlBuilder.prototype.getParameters = function() {
    return this.c;
};
mboxUrlBuilder.prototype.setParameters = function(c) {
    this.c = c;
};
mboxUrlBuilder.prototype.clone = function() {
    var s = new mboxUrlBuilder(this.a, this.b);
    s.setServerType(this.m);
    s.setBasePath(this.f);
    s.setUrlProcessAction(this.d);
    for (var i = 0; i < this.c.length; i++) {
        s.addParameter(this.c[i].name, this.c[i].value);
    }
    return s;
};
mboxUrlBuilder.prototype.r = function(t) {
    return t.replace(/\"/g, '&quot;').replace(/>/g, '&gt;');
};
mboxUrlBuilder.prototype.checkInvalidCharacters = function(g) {
    var u = new RegExp('(\'|")');
    if (u.exec(g)) {
        throw "Parameter '" + g + "' contains invalid characters";
    }
};
mboxStandardFetcher = function() {
};
mboxStandardFetcher.prototype.getType = function() {
    return 'standard';
};
mboxStandardFetcher.prototype.fetch = function(v) {
    v.setServerType(this.getType());
    document.write('<' + 'scr' + 'ipt src="' + v.buildUrl() + '" language="JavaScript"><' + '\/scr' + 'ipt>');
};
mboxStandardFetcher.prototype.cancel = function() {
};
mboxAjaxFetcher = function() {
};
mboxAjaxFetcher.prototype.getType = function() {
    return 'ajax';
};
mboxAjaxFetcher.prototype.fetch = function(v) {
    v.setServerType(this.getType());
    var e = v.buildUrl();
    this.w = document.createElement('script');
    this.w.src = e;
    document.body.appendChild(this.w);
};
mboxAjaxFetcher.prototype.cancel = function() {
};
mboxMap = function() {
    this.x = new Object();
    this.y = new Array();
};
mboxMap.prototype.put = function(z, h) {
    if (!this.x[z]) {
        this.y[this.y.length] = z;
    }
    this.x[z] = h;
};
mboxMap.prototype.get = function(z) {
    return this.x[z];
};
mboxMap.prototype.remove = function(z) {
    this.x[z] = undefined;
};
mboxMap.prototype.each = function(n) {
    for (var i = 0; i < this.y.length; i++) {
        var z = this.y[i];
        var h = this.x[z];
        if (h) {
            var A = n(z, h);
            if (A === false) {
                break;
            }
        }
    }
};
mboxFactory = function(B, b, C) {
    this.D = false;
    this.B = B;
    this.C = C;
    this.E = new mboxList();
    mboxFactories.put(C, this);
    this.F = typeof document.createElement('div').replaceChild != 'undefined' && (function() {
        return true;
    })() && typeof document.getElementById != 'undefined' && typeof (window.attachEvent || document.addEventListener || window.addEventListener) != 'undefined' && typeof encodeURIComponent != 'undefined';
    this.G = this.F && mboxGetPageParameter('mboxDisable') == null;
    var H = C == 'default';
    this.I = new mboxCookieManager('mbox' + (H ? '' : ('-' + C)), (function() {
        return mboxCookiePageDomain();
    })());
    this.G = this.G && this.I.isEnabled() && (this.I.getCookie('disable') == null);
    if (this.isAdmin()) {
        this.enable();
    }
    this.J();
    this.K = mboxGenerateId();
    this.L = mboxScreenHeight();
    this.M = mboxScreenWidth();
    this.N = mboxBrowserWidth();
    this.O = mboxBrowserHeight();
    this.P = mboxScreenColorDepth();
    this.Q = mboxBrowserTimeOffset();
    this.R = new mboxSession(this.K, 'mboxSession', 'session', 31 * 60, this.I);
    this.S = new mboxPC('PC', 7776000, this.I);
    this.v = new mboxUrlBuilder(B, b);
    this.T(this.v, H);
    this.U = new Date().getTime();
    this.V = this.U;
    var W = this;
    this.addOnLoad(function() {
        W.V = new Date().getTime();
    });
    if (this.F) {
        this.addOnLoad(function() {
            W.D = true;
            W.getMboxes().each(function(X) {
                X.setFetcher(new mboxAjaxFetcher());
                X.finalize();
            });
        });
        if (this.G) {
            this.limitTraffic(100, 10368000);
            this.Y();
            this.Z = new mboxSignaler(function(_, c) {
                return W.create(_, c);
            }, this.I);
        }
    }
};
mboxFactory.prototype.isEnabled = function() {
    return this.G;
};
mboxFactory.prototype.getDisableReason = function() {
    return this.I.getCookie('disable');
};
mboxFactory.prototype.isSupported = function() {
    return this.F;
};
mboxFactory.prototype.disable = function(ab, bb) {
    if (typeof ab == 'undefined') {
        ab = 60 * 60;
    }
    if (typeof bb == 'undefined') {
        bb = 'unspecified';
    }
    if (!this.isAdmin()) {
        this.G = false;
        this.I.setCookie('disable', bb, ab);
    }
};
mboxFactory.prototype.enable = function() {
    this.G = true;
    this.I.deleteCookie('disable');
};
mboxFactory.prototype.isAdmin = function() {
    return document.location.href.indexOf('mboxEnv') != -1;
};
mboxFactory.prototype.limitTraffic = function(cb, ab) {
};
mboxFactory.prototype.addOnLoad = function(db) {
    if (this.isDomLoaded()) {
        db();
    } else {
        var eb = false;
        var fb = function() {
            if (eb) {
                return;
            }
            eb = true;
            db();
        };
        this.gb.push(fb);
        if (this.isDomLoaded() && !eb) {
            fb();
        }
    }
};
mboxFactory.prototype.getEllapsedTime = function() {
    return this.V - this.U;
};
mboxFactory.prototype.getEllapsedTimeUntil = function(hb) {
    return hb - this.U;
};
mboxFactory.prototype.getMboxes = function() {
    return this.E;
};
mboxFactory.prototype.get = function(_, ib) {
    return this.E.get(_).getById(ib || 0);
};
mboxFactory.prototype.update = function(_, c) {
    if (!this.isEnabled()) {
        return;
    }
    if (!this.isDomLoaded()) {
        var W = this;
        this.addOnLoad(function() {
            W.update(_, c);
        });
        return;
    }
    if (this.E.get(_).length() == 0) {
        throw "Mbox " + _ + " is not defined";
    }
    this.E.get(_).each(function(X) {
        X.getUrlBuilder().addParameter('mboxPage', mboxGenerateId());
        X.load(c);
    });
};
mboxFactory.prototype.setVisitorIdParameters = function(e) {
    var namespace = '';
    if (typeof Visitor == 'undefined' || typeof Visitor.ID_TYPE_AUTHENTICATED == 'undefined' || namespace.length == 0) {
        return;
    }
    var anonymousVisitorIdName = 'mboxMCVID';
    var globalVisitorIdName = 'mboxMCGVID';
    var customVisitorIdName = 'mboxMCCUSTID';
    var globalLocationHintName = 'mboxMCGLH';
    var visitor = Visitor.getInstance(namespace);
    if (visitor.isAllowed()) {
        var globalVisitorID = visitor.getGlobalVisitorID(function(callbackGlobalVisitorID) {
            e.addParameterIfAbsent(globalVisitorIdName, callbackGlobalVisitorID);
            if (callbackGlobalVisitorID) {
                e.addParameterIfAbsent(globalLocationHintName, visitor.getGlobalLocationHint());
            }
        });
        e.addParameterIfAbsent(globalVisitorIdName, globalVisitorID);
        var anonymousVisitorId = visitor.getAnonymousVisitorID(function(callbackAnonymousVisitorID) {
            e.addParameterIfAbsent(anonymousVisitorIdName, callbackAnonymousVisitorID);
        });
        e.addParameterIfAbsent(anonymousVisitorIdName, anonymousVisitorId);
        e.addParameterIfAbsent(customVisitorIdName, visitor.getAuthenticatedVisitorID());
        if (globalVisitorID) {
            e.addParameterIfAbsent(globalLocationHintName, visitor.getGlobalLocationHint());
        }
    }
};
mboxFactory.prototype.create = function(_, c, jb) {
    if (!this.isSupported()) {
        return null;
    }
    var e = this.v.clone();
    e.addParameter('mboxCount', this.E.length() + 1);
    e.addParameters(c);
    this.setVisitorIdParameters(e);
    var ib = this.E.get(_).length();
    var kb = this.C + '-' + _ + '-' + ib;
    var lb;
    if (jb) {
        lb = new mboxLocatorNode(jb);
    } else {
        if (this.D) {
            throw 'The page has already been loaded, can\'t write marker';
        }
        lb = new mboxLocatorDefault(kb);
    }
    try {
        var W = this;
        var mb = 'mboxImported-' + kb;
        var X = new mbox(_, ib, e, lb, mb);
        if (this.G) {
            X.setFetcher(this.D ? new mboxAjaxFetcher() : new mboxStandardFetcher());
        }
        X.setOnError(function(nb, l) {
            X.setMessage(nb);
            X.activate();
            if (!X.isActivated()) {
                W.disable(60 * 60, nb);
                window.location.reload(false);
            }
        });
        this.E.add(X);
    } catch (ob) {
        this.disable();
        throw 'Failed creating mbox "' + _ + '", the error was: ' + ob;
    }
    var pb = new Date();
    e.addParameter('mboxTime', pb.getTime() - (pb.getTimezoneOffset() * 60000));
    return X;
};
mboxFactory.prototype.getCookieManager = function() {
    return this.I;
};
mboxFactory.prototype.getPageId = function() {
    return this.K;
};
mboxFactory.prototype.getPCId = function() {
    return this.S;
};
mboxFactory.prototype.getSessionId = function() {
    return this.R;
};
mboxFactory.prototype.getSignaler = function() {
    return this.Z;
};
mboxFactory.prototype.getUrlBuilder = function() {
    return this.v;
};
mboxFactory.prototype.T = function(e, H) {
    e.addParameter('mboxHost', document.location.hostname).addParameter('mboxSession', this.R.getId());
    if (!H) {
        e.addParameter('mboxFactoryId', this.C);
    }
    if (this.S.getId() != null) {
        e.addParameter('mboxPC', this.S.getId());
    }
    e.addParameter('mboxPage', this.K);
    e.addParameter('screenHeight', this.L);
    e.addParameter('screenWidth', this.M);
    e.addParameter('browserWidth', this.N);
    e.addParameter('browserHeight', this.O);
    e.addParameter('browserTimeOffset', this.Q);
    e.addParameter('colorDepth', this.P);
    e.addParameter('mboxXDomain', "enabled");
    e.setUrlProcessAction(function(e) {
        e += '&mboxURL=' + encodeURIComponent(document.location);
        var qb = encodeURIComponent(document.referrer);
        if (e.length + qb.length < 2000) {
            e += '&mboxReferrer=' + qb;
        }
        e += '&mboxVersion=' + mboxVersion;
        return e;
    });
};
mboxFactory.prototype.rb = function() {
    return "";
};
mboxFactory.prototype.Y = function() {
    document.write('<style>.' + 'mboxDefault' + ' { visibility:hidden; }</style>');
};
mboxFactory.prototype.isDomLoaded = function() {
    return this.D;
};
mboxFactory.prototype.J = function() {
    if (this.gb != null) {
        return;
    }
    this.gb = new Array();
    var W = this;
    (function() {
        var sb = document.addEventListener ? "DOMContentLoaded" : "onreadystatechange";
        var tb = false;
        var ub = function() {
            if (tb) {
                return;
            }
            tb = true;
            for (var i = 0; i < W.gb.length; ++i) {
                W.gb[i]();
            }
        };
        if (document.addEventListener) {
            document.addEventListener(sb, function() {
                document.removeEventListener(sb, arguments.callee, false);
                ub();
            }, false);
            window.addEventListener("load", function() {
                document.removeEventListener("load", arguments.callee, false);
                ub();
            }, false);
        } else if (document.attachEvent) {
            if (self !== self.top) {
                document.attachEvent(sb, function() {
                    if (document.readyState === 'complete') {
                        document.detachEvent(sb, arguments.callee);
                        ub();
                    }
                });
            } else {
                var vb = function() {
                    try {
                        document.documentElement.doScroll('left');
                        ub();
                    } catch (wb) {
                        setTimeout(vb, 13);
                    }
                };
                vb();
            }
        }
        if (document.readyState === "complete") {
            ub();
        }
    })();
};
mboxSignaler = function(xb, I) {
    this.I = I;
    var yb = I.getCookieNames('signal-');
    for (var i = 0; i < yb.length; i++) {
        var zb = yb[i];
        var Ab = I.getCookie(zb).split('&');
        var X = xb(Ab[0], Ab);
        X.load();
        I.deleteCookie(zb);
    }
};
mboxSignaler.prototype.signal = function(Bb, _) {
    this.I.setCookie('signal-' + Bb, mboxShiftArray(arguments).join('&'), 45 * 60);
};
mboxList = function() {
    this.E = new Array();
};
mboxList.prototype.add = function(X) {
    if (X != null) {
        this.E[this.E.length] = X;
    }
};
mboxList.prototype.get = function(_) {
    var A = new mboxList();
    for (var i = 0; i < this.E.length; i++) {
        var X = this.E[i];
        if (X.getName() == _) {
            A.add(X);
        }
    }
    return A;
};
mboxList.prototype.getById = function(Cb) {
    return this.E[Cb];
};
mboxList.prototype.length = function() {
    return this.E.length;
};
mboxList.prototype.each = function(n) {
    if (typeof n != 'function') {
        throw 'Action must be a function, was: ' + typeof (n);
    }
    for (var i = 0; i < this.E.length; i++) {
        n(this.E[i]);
    }
};
mboxLocatorDefault = function(g) {
    this.g = 'mboxMarker-' + g;
    document.write('<div id="' + this.g + '" style="visibility:hidden;display:none">&nbsp;</div>');
};
mboxLocatorDefault.prototype.locate = function() {
    var Db = document.getElementById(this.g);
    while (Db != null) {
        if (Db.nodeType == 1) {
            if (Db.className == 'mboxDefault') {
                return Db;
            }
        }
        Db = Db.previousSibling;
    }
    return null;
};
mboxLocatorDefault.prototype.force = function() {
    var Eb = document.createElement('div');
    Eb.className = 'mboxDefault';
    var Fb = document.getElementById(this.g);
    Fb.parentNode.insertBefore(Eb, Fb);
    return Eb;
};
mboxLocatorNode = function(Gb) {
    this.Db = Gb;
};
mboxLocatorNode.prototype.locate = function() {
    return typeof this.Db == 'string' ? document.getElementById(this.Db) : this.Db;
};
mboxLocatorNode.prototype.force = function() {
    return null;
};
mboxCreate = function(_) {
    var X = mboxFactoryDefault.create(_, mboxShiftArray(arguments));
    if (X) {
        X.load();
    }
    return X;
};
mboxDefine = function(jb, _) {
    var X = mboxFactoryDefault.create(_, mboxShiftArray(mboxShiftArray(arguments)), jb);
    return X;
};
mboxUpdate = function(_) {
    mboxFactoryDefault.update(_, mboxShiftArray(arguments));
};
mbox = function(g, Hb, v, Ib, mb) {
    this.Jb = null;
    this.Kb = 0;
    this.lb = Ib;
    this.mb = mb;
    this.Lb = null;
    this.Mb = new mboxOfferContent();
    this.Eb = null;
    this.v = v;
    this.message = '';
    this.Nb = new Object();
    this.Ob = 0;
    this.Hb = Hb;
    this.g = g;
    this.Pb();
    v.addParameter('mbox', g).addParameter('mboxId', Hb);
    this.Qb = function() {
    };
    this.Rb = function() {
    };
    this.Sb = null;
};
mbox.prototype.getId = function() {
    return this.Hb;
};
mbox.prototype.Pb = function() {
    if (this.g.length > 250) {
        throw "Mbox Name " + this.g + " exceeds max length of " + "250 characters.";
    } else if (this.g.match(/^\s+|\s+$/g)) {
        throw "Mbox Name " + this.g + " has leading/trailing whitespace(s).";
    }
};
mbox.prototype.getName = function() {
    return this.g;
};
mbox.prototype.getParameters = function() {
    var c = this.v.getParameters();
    var A = new Array();
    for (var i = 0; i < c.length; i++) {
        if (c[i].name.indexOf('mbox') != 0) {
            A[A.length] = c[i].name + '=' + c[i].value;
        }
    }
    return A;
};
mbox.prototype.setOnLoad = function(n) {
    this.Rb = n;
    return this;
};
mbox.prototype.setMessage = function(nb) {
    this.message = nb;
    return this;
};
mbox.prototype.setOnError = function(Qb) {
    this.Qb = Qb;
    return this;
};
mbox.prototype.setFetcher = function(Tb) {
    if (this.Lb) {
        this.Lb.cancel();
    }
    this.Lb = Tb;
    return this;
};
mbox.prototype.getFetcher = function() {
    return this.Lb;
};
mbox.prototype.load = function(c) {
    if (this.Lb == null) {
        return this;
    }
    this.setEventTime("load.start");
    this.cancelTimeout();
    this.Kb = 0;
    var v = (c && c.length > 0) ? this.v.clone().addParameters(c) : this.v;
    this.Lb.fetch(v);
    var W = this;
    this.Ub = setTimeout(function() {
        W.Qb('browser timeout', W.Lb.getType());
    }, 15000);
    this.setEventTime("load.end");
    return this;
};
mbox.prototype.loaded = function() {
    this.cancelTimeout();
    if (!this.activate()) {
        var W = this;
        setTimeout(function() {
            W.loaded();
        }, 100);
    }
};
mbox.prototype.activate = function() {
    if (this.Kb) {
        return this.Kb;
    }
    this.setEventTime('activate' + ++this.Ob + '.start');
    if (this.show()) {
        this.cancelTimeout();
        this.Kb = 1;
    }
    this.setEventTime('activate' + this.Ob + '.end');
    return this.Kb;
};
mbox.prototype.isActivated = function() {
    return this.Kb;
};
mbox.prototype.setOffer = function(Mb) {
    if (Mb && Mb.show && Mb.setOnLoad) {
        this.Mb = Mb;
    } else {
        throw 'Invalid offer';
    }
    return this;
};
mbox.prototype.getOffer = function() {
    return this.Mb;
};
mbox.prototype.show = function() {
    this.setEventTime('show.start');
    var A = this.Mb.show(this);
    this.setEventTime(A == 1 ? "show.end.ok" : "show.end");
    return A;
};
mbox.prototype.showContent = function(Vb) {
    if (Vb == null) {
        return 0;
    }
    if (this.Eb == null || !this.Eb.parentNode) {
        this.Eb = this.getDefaultDiv();
        if (this.Eb == null) {
            return 0;
        }
    }
    if (this.Eb != Vb) {
        this.Wb(this.Eb);
        this.Eb.parentNode.replaceChild(Vb, this.Eb);
        this.Eb = Vb;
    }
    this.Xb(Vb);
    this.Rb();
    return 1;
};
mbox.prototype.hide = function() {
    this.setEventTime('hide.start');
    var A = this.showContent(this.getDefaultDiv());
    this.setEventTime(A == 1 ? 'hide.end.ok' : 'hide.end.fail');
    return A;
};
mbox.prototype.finalize = function() {
    this.setEventTime('finalize.start');
    this.cancelTimeout();
    if (this.getDefaultDiv() == null) {
        if (this.lb.force() != null) {
            this.setMessage('No default content, an empty one has been added');
        } else {
            this.setMessage('Unable to locate mbox');
        }
    }
    if (!this.activate()) {
        this.hide();
        this.setEventTime('finalize.end.hide');
    }
    this.setEventTime('finalize.end.ok');
};
mbox.prototype.cancelTimeout = function() {
    if (this.Ub) {
        clearTimeout(this.Ub);
    }
    if (this.Lb != null) {
        this.Lb.cancel();
    }
};
mbox.prototype.getDiv = function() {
    return this.Eb;
};
mbox.prototype.getDefaultDiv = function() {
    if (this.Sb == null) {
        this.Sb = this.lb.locate();
    }
    return this.Sb;
};
mbox.prototype.setEventTime = function(Yb) {
    this.Nb[Yb] = (new Date()).getTime();
};
mbox.prototype.getEventTimes = function() {
    return this.Nb;
};
mbox.prototype.getImportName = function() {
    return this.mb;
};
mbox.prototype.getURL = function() {
    return this.v.buildUrl();
};
mbox.prototype.getUrlBuilder = function() {
    return this.v;
};
mbox.prototype.Zb = function(Eb) {
    return Eb.style.display != 'none';
};
mbox.prototype.Xb = function(Eb) {
    this._b(Eb, true);
};
mbox.prototype.Wb = function(Eb) {
    this._b(Eb, false);
};
mbox.prototype._b = function(Eb, ac) {
    Eb.style.visibility = ac ? "visible" : "hidden";
    Eb.style.display = ac ? "block" : "none";
};
mboxOfferContent = function() {
    this.Rb = function() {
    };
};
mboxOfferContent.prototype.show = function(X) {
    var A = X.showContent(document.getElementById(X.getImportName()));
    if (A == 1) {
        this.Rb();
    }
    return A;
};
mboxOfferContent.prototype.setOnLoad = function(Rb) {
    this.Rb = Rb;
};
mboxOfferAjax = function(Vb) {
    this.Vb = Vb;
    this.Rb = function() {
    };
};
mboxOfferAjax.prototype.setOnLoad = function(Rb) {
    this.Rb = Rb;
};
mboxOfferAjax.prototype.show = function(X) {
    var bc = document.createElement('div');
    bc.id = X.getImportName();
    bc.innerHTML = this.Vb;
    var A = X.showContent(bc);
    if (A == 1) {
        this.Rb();
    }
    return A;
};
mboxOfferDefault = function() {
    this.Rb = function() {
    };
};
mboxOfferDefault.prototype.setOnLoad = function(Rb) {
    this.Rb = Rb;
};
mboxOfferDefault.prototype.show = function(X) {
    var A = X.hide();
    if (A == 1) {
        this.Rb();
    }
    return A;
};
mboxCookieManager = function mboxCookieManager(g, cc) {
    this.g = g;
    this.cc = cc == '' || cc.indexOf('.') == -1 ? '' : '; domain=' + cc;
    this.dc = new mboxMap();
    this.loadCookies();
};
mboxCookieManager.prototype.isEnabled = function() {
    this.setCookie('check', 'true', 60);
    this.loadCookies();
    return this.getCookie('check') == 'true';
};
mboxCookieManager.prototype.setCookie = function(g, h, ab) {
    if (typeof g != 'undefined' && typeof h != 'undefined' && typeof ab != 'undefined') {
        var ec = new Object();
        ec.name = g;
        ec.value = escape(h);
        ec.expireOn = Math.ceil(ab + new Date().getTime() / 1000);
        this.dc.put(g, ec);
        this.saveCookies();
    }
};
mboxCookieManager.prototype.getCookie = function(g) {
    var ec = this.dc.get(g);
    return ec ? unescape(ec.value) : null;
};
mboxCookieManager.prototype.deleteCookie = function(g) {
    this.dc.remove(g);
    this.saveCookies();
};
mboxCookieManager.prototype.getCookieNames = function(fc) {
    var gc = new Array();
    this.dc.each(function(g, ec) {
        if (g.indexOf(fc) == 0) {
            gc[gc.length] = g;
        }
    });
    return gc;
};
mboxCookieManager.prototype.saveCookies = function() {
    var hc = false;
    var ic = 'disable';
    var jc = new Array();
    var kc = 0;
    this.dc.each(function(g, ec) {
        if (!hc || g === ic) {
            jc[jc.length] = g + '#' + ec.value + '#' + ec.expireOn;
            if (kc < ec.expireOn) {
                kc = ec.expireOn;
            }
        }
    });
    var lc = new Date(kc * 1000);
    document.cookie = this.g + '=' + jc.join('|') + '; expires=' + lc.toGMTString() + '; path=/' + this.cc;
};
mboxCookieManager.prototype.loadCookies = function() {
    this.dc = new mboxMap();
    var mc = document.cookie.indexOf(this.g + '=');
    if (mc != -1) {
        var nc = document.cookie.indexOf(';', mc);
        if (nc == -1) {
            nc = document.cookie.indexOf(',', mc);
            if (nc == -1) {
                nc = document.cookie.length;
            }
        }
        var oc = document.cookie.substring(mc + this.g.length + 1, nc).split('|');
        var pc = Math.ceil(new Date().getTime() / 1000);
        for (var i = 0; i < oc.length; i++) {
            var ec = oc[i].split('#');
            if (pc <= ec[2]) {
                var qc = new Object();
                qc.name = ec[0];
                qc.value = ec[1];
                qc.expireOn = ec[2];
                this.dc.put(qc.name, qc);
            }
        }
    }
};
mboxSession = function(rc, sc, zb, tc, I) {
    this.sc = sc;
    this.zb = zb;
    this.tc = tc;
    this.I = I;
    this.uc = false;
    this.Hb = typeof mboxForceSessionId != 'undefined' ? mboxForceSessionId : mboxGetPageParameter(this.sc);
    if (this.Hb == null || this.Hb.length == 0) {
        this.Hb = I.getCookie(zb);
        if (this.Hb == null || this.Hb.length == 0) {
            this.Hb = rc;
            this.uc = true;
        }
    }
    I.setCookie(zb, this.Hb, tc);
};
mboxSession.prototype.getId = function() {
    return this.Hb;
};
mboxSession.prototype.forceId = function(vc) {
    this.Hb = vc;
    this.I.setCookie(this.zb, this.Hb, this.tc);
};
mboxPC = function(zb, tc, I) {
    this.zb = zb;
    this.tc = tc;
    this.I = I;
    this.Hb = typeof mboxForcePCId != 'undefined' ? mboxForcePCId : I.getCookie(zb);
    if (this.Hb != null) {
        I.setCookie(zb, this.Hb, tc);
    }
};
mboxPC.prototype.getId = function() {
    return this.Hb;
};
mboxPC.prototype.forceId = function(vc) {
    if (this.Hb != vc) {
        this.Hb = vc;
        this.I.setCookie(this.zb, this.Hb, this.tc);
        return true;
    }
    return false;
};
mboxGetPageParameter = function(g) {
    var A = null;
    var wc = new RegExp(g + "=([^\&]*)");
    var xc = wc.exec(document.location);
    if (xc != null && xc.length >= 2) {
        A = xc[1];
    }
    return A;
};
mboxSetCookie = function(g, h, ab) {
    return mboxFactoryDefault.getCookieManager().setCookie(g, h, ab);
};
mboxGetCookie = function(g) {
    return mboxFactoryDefault.getCookieManager().getCookie(g);
};
mboxCookiePageDomain = function() {
    var cc = (/([^:]*)(:[0-9]{0,5})?/).exec(document.location.host)[1];
    var yc = /[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/;
    if (!yc.exec(cc)) {
        var zc = (/([^\.]+\.[^\.]{3}|[^\.]+\.[^\.]+\.[^\.]{2})$/).exec(cc);
        if (zc) {
            cc = zc[0];
        }
    }
    return cc ? cc : "";
};
mboxShiftArray = function(Ac) {
    var A = new Array();
    for (var i = 1; i < Ac.length; i++) {
        A[A.length] = Ac[i];
    }
    return A;
};
mboxGenerateId = function() {
    return (new Date()).getTime() + "-" + Math.floor(Math.random() * 999999);
};
mboxScreenHeight = function() {
    return screen.height;
};
mboxScreenWidth = function() {
    return screen.width;
};
mboxBrowserWidth = function() {
    return (window.innerWidth) ? window.innerWidth : document.documentElement ? document.documentElement.clientWidth : document.body.clientWidth;
};
mboxBrowserHeight = function() {
    return (window.innerHeight) ? window.innerHeight : document.documentElement ? document.documentElement.clientHeight : document.body.clientHeight;
};
mboxBrowserTimeOffset = function() {
    return -new Date().getTimezoneOffset();
};
mboxScreenColorDepth = function() {
    return screen.pixelDepth;
};
if (typeof mboxVersion == 'undefined') {
    var mboxVersion = 43;
    var mboxFactories = new mboxMap();
    var mboxFactoryDefault = new mboxFactory('starwoodhotelsandres.tt.omtrdc.net', 'starwoodhotelsandres', 'default');
}
;
if (mboxGetPageParameter("mboxDebug") != null || mboxFactoryDefault.getCookieManager().getCookie("debug") != null) {
    setTimeout(function() {
        if (typeof mboxDebugLoaded == 'undefined') {
            alert('Could not load the remote debug.\nPlease check your connection' + ' to Test&amp;Target servers');
        }
    }, 60 * 60);
    document.write('<' + 'scr' + 'ipt language="Javascript1.2" src=' + '"http://admin12.testandtarget.omniture.com/admin/mbox/mbox_debug.jsp?mboxServerHost=starwoodhotelsandres.tt.omtrdc.net' + '&clientCode=starwoodhotelsandres"><' + '\/scr' + 'ipt>');
}
;
mboxVizTargetUrl = function(_) {
    if (!mboxFactoryDefault.isEnabled()) {
        return;
    }
    var v = mboxFactoryDefault.getUrlBuilder().clone();
    v.setBasePath('/m2/' + 'starwoodhotelsandres' + '/viztarget');
    v.addParameter('mbox', _);
    v.addParameter('mboxId', 0);
    v.addParameter('mboxCount', mboxFactoryDefault.getMboxes().length() + 1);
    var pb = new Date();
    v.addParameter('mboxTime', pb.getTime() - (pb.getTimezoneOffset() * 60000));
    v.addParameter('mboxPage', mboxGenerateId());
    var c = mboxShiftArray(arguments);
    if (c && c.length > 0) {
        v.addParameters(c);
    }
    return v.buildUrl();
};
function aam_tnt_cb() {
    if (typeof (arguments[0].stuff) != "undefined" && arguments[0].stuff != "") {
        for (var i = 0; i < arguments[0].stuff.length; i++) {
            if (arguments[0].stuff[i].cn == "aam_tnt") {
                if (arguments[0].stuff[0].cv.split(",")) {
                    var demdex_raw = arguments[0].stuff[i].cv.split(",");
                    var tapMboxBuilder = mboxFactoryDefault.getUrlBuilder();
                    tapMboxBuilder.addParameters(demdex_raw);
                }
            }
        }
    }
}

/**************************************************************************************



/common/js/webFormUtility.js



**************************************************************************************/
function isNull(fieldValue) {
    if (fieldValue == null) {
        fieldValue = ''
    }
    ;
    return (fieldValue.length == 0);
}

function isMatch(field1, field2) {
    if ((field1 != '' && field1 != null) && (field2 != '' && field2 != null))
        return (field1 == field2);
}

function isFieldTooLong(field, valLength) {
    if (field != null && field != '')
        return (field.length > valLength);
}

function isFieldTooShort(field, valLength) {
    if (field != null && field != '')
        return (field.length < valLength);
}
function setDropDown(v, dd) {
    for (i = 0; i < dd.options.length - 1; i++) {
        if (dd.options[i].value == v) {
            dd.selectedIndex = i;
            return true
        }
    }
    return false;
}
function isIn(elt, list) {
    for (var i = 0; i < list.length; i++) {
        var tempArray = list[i].split(":")
        if (tempArray[0] == elt) {
            return tempArray;
        }
    }
    return false;
}
function stripCharsInBag(s, bag) {
    var i;
    var returnString = "";
    for (i = 0; i < s.length; i++) {
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1)
            returnString += c;
    }
    return returnString;
}
function hasChars(str) {
    if (str == null)
        return false;
    str = str.toLowerCase();
    for (var i = 1; i < arguments.length; i++) {
        arguments[i] = arguments[i].toLowerCase();
        if (str.indexOf(arguments[i]) != -1)
            return true;
    }
    return false;
}
function isInteger(s) {
    if (s != null && s != '') {
        var re = /^\d+$/;
        return (s.search(re) == -1) ? false : true;
    } else {
        return true;
    }
}
function fillOtherField(field1, field2) {
    if (field1 != null && field1.value != '' && (field2.value != null && field2.value == '')) {
        field2.value = field1.value;
    }
}

function fnTrimString(pStringToTrim) {
    var lsReturnString = pStringToTrim;
    lsReturnString = lsReturnString.replace(/^\s*/, "");
    lsReturnString = lsReturnString.replace(/\s*$/, "");
    return lsReturnString;
}

function fnValidateFromRegEx(pFieldValue, pRegExp, pRequiredField, pAllowSpecialChars) {
    var lbValid = false;
    if (pRequiredField) {
        if (!isNull(pFieldValue)) {
            lbValid = pRegExp.test(pFieldValue);
            if (!pAllowSpecialChars) {
                isRequiredContainsChars(pFieldValue);
            }
        }
    } 
    else {
        lbValid = (isNull(pFieldValue)) ? true : pRegExp.test(pFieldValue);
    }
    return lbValid;
}

function isValidNameField(pFieldValue, pRequiredField) {
    var regexp = /^([a-z]| |'|-)+$/i;
    return fnValidateFromRegEx(pFieldValue, regexp, pRequiredField);
}

function isValidAddress(pFieldValue, pRequiredField) {
    var regexp = /^([a-z0-9]| |'|-|\.|,|\/)+$/i;
    return fnValidateFromRegEx(pFieldValue, regexp, pRequiredField);
}

function isValidAddress2(pFieldValue, pRequiredField) {
    var regexp = /^([a-z0-9]| |'|-|\.|,|#|\/)+$/i;
    return fnValidateFromRegEx(pFieldValue, regexp, pRequiredField);
}

function isValidCity(pFieldValue, pRequiredField) {
    var regexp = /^([a-z]| |-|\.|,)+$/i;
    return fnValidateFromRegEx(pFieldValue, regexp, pRequiredField);
}

function isValidDateOfBirth(birthMonthValue, birthDateValue) {
    if ((birthMonthValue != "" && birthDateValue != "") || (birthMonthValue == "" && birthDateValue == "")) {
        return true;
    }
    return false;
}

function isValidUserName(pFieldValue, pRequiredField) {
    var lbValid = false;
    if (!isFieldTooShort(pFieldValue, 6)) {
        var regexp = /^([a-z0-9]|\+|`|'|@|\.|_|-|)+$/i;
        lbValid = fnValidateFromRegEx(pFieldValue, regexp, pRequiredField, true);
    }
    return lbValid;
}

function isValidPhonePassword(pFieldValue, pRequiredField) {
    if (!isNull(pFieldValue)) {
        var lbValid = false;
        if (!isFieldTooShort(pFieldValue, 6) && !isFieldTooLong(pFieldValue, 15)) {
            lbValid = !/\s/g.test(pFieldValue);
        }
        return lbValid;
    } 
    else {
        return true;
    }
}

function isValidPhonePasswordPage(pFieldValue, pRequiredField) {
    if (!isNull(pFieldValue)) {
        var lbValid = false;
        if (!isFieldTooShort(pFieldValue, 6) && !isFieldTooLong(pFieldValue, 15)) {
            lbValid = !/\s/g.test(pFieldValue);
        }
        return lbValid;
    } 
    else {
        return false;
    }
}

function isValidPassword(pFieldValue, pRequiredField) {
    var regexp = /^(?=.*[a-z|A-Z])(?=.*[0-9])(|!|\@|\#|\$|\%|\^|\&|\*|\"|\(|\))\.*/;
    return fnValidateFromRegEx(pFieldValue, regexp, pRequiredField, true);
}

function isValidChallengeAnswer(pFieldValue, pRequiredField) {
    var regexp = /^([a-z0-9]| |)+$/i;
    return fnValidateFromRegEx(pFieldValue, regexp, pRequiredField);
}

function nameContainsNumber(pFieldValue, pRequiredField) {
    var regexp = /^[^0-9]+$/i;
    lbValid = (isNull(pFieldValue)) ? true : regexp.test(pFieldValue);
    return lbValid;
}

function isRequiredContainsChars(pFieldValue) {
    var reIllegalRequiredChars = /\!|\@|\#|\$|\%|\^|\&|\*|\"|\(|\)/;
    if (reIllegalRequiredChars.test(pFieldValue) && webFormVar) {
        var lbErrorExists = false;
        for (var i = 0; i < webFormVar.errors.length; i++) {
            if (webFormVar.errors[i].obj1 == 'specialCharsErrorDiv') {
                lbErrorExists = true;
                break;
            }
        }
        if (!lbErrorExists) {
            webFormVar.addError("specialCharsErrorDiv", "!inst", "instAlt");
        }
    }
}

function isValidAccountNumber(pFieldValue) {
    var lbValid = false;
    if (!isNull(pFieldValue)) {
        var regexp = /^\d+$/;
        if (regexp.test(pFieldValue)) {
            if (pFieldValue.length >= 2 && pFieldValue.length <= 9) {
                lbValid = true;
            }
        }
    } 
    else {
        lbValid = true;
    }
    return lbValid;
}





